From 2c805053c32956162bf2fd74906db1e2aeea5d9e Mon Sep 17 00:00:00 2001 From: idk Date: Tue, 3 Apr 2018 01:07:08 -0400 Subject: [PATCH] let's see if this ill-advised homebrew works --- README.md.asc | 16 ++++++++-------- auth.go | 6 ++++++ example/demo.go | 2 +- json.go | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md.asc b/README.md.asc index e03c2a0..64f91db 100644 --- a/README.md.asc +++ b/README.md.asc @@ -5,12 +5,12 @@ Hash: SHA256 An easy-to-use library for the i2pcontrol rpc interface. -----BEGIN PGP SIGNATURE----- -iQEzBAEBCAAdFiEEcNIGBzi++AUjrK/311wDs5teFOEFAlrDCswACgkQ11wDs5te -FOFtbwf/UpoNUqvLZKJtMadIhtPdKaE+/s8MrMYBTeuflilmtgg/7zgoLh7CTUKg -MpcZ5vMInR9W13Ce2YB6p8b3Xgs6HTAqb+7aVoTlbWHbCzrC8WMavuKC80KH/PHQ -cZ+VuRizwSb5SjHwXAskLTfs51/mBebP/x5teOWqo/Gl9G3snokQ1bA8moI4cAxq -QFFbjy98/tdQK2PeVGp5X43U/583QzWmBPWFnMCfWDblz1YNn0ay2B8AMJ3Kjs+N -UyNmpoQw/mXt25BK4qThRsPmRhe3s3W9yfIsI+HvSxsryo+fJRkRjpA+bcRDfSfp -fKW+8v45oWqTJGSibUFg5JvI6Bw75g== -=+QTs +iQEzBAEBCAAdFiEEcNIGBzi++AUjrK/311wDs5teFOEFAlrDC/sACgkQ11wDs5te +FOEboQf+L7fxtRkSP1OmYxk/aSx2JVc4Cdnp1ohsSdyRqfCNOQsUszA0TqxmivRE +qtxYs5Oy6ibO2eQpJpEIj2qNv2fjzzlIdt5gSn9Ai0WSpVhLuQSV34Iip/Z5JEvV +lvLCFgd0rVB1ejbSrHmpH9wAKHwE4ZtNwlGwGj/lkW5Jy2qg52rW99z/YvExfGU2 +i37JtEdbC7t9rjCGbXkEdwqbuLeZV2EDHdR4/SCH0YdmWI5f9cS+x1czLuzuDx9F +LDJ1uJMnQS1epCJmijjmf2YnUEfO3JmfAHH3/8gS1Yyb2+220tsdtQmZZARJGLzS +/I8utF7ASFKB+Kw42k/G7Aqqr5bNcA== +=NRRg -----END PGP SIGNATURE----- diff --git a/auth.go b/auth.go index 5ac5b0c..ce049da 100644 --- a/auth.go +++ b/auth.go @@ -1,5 +1,7 @@ package i2pcontrol +import fmt + type i2pControlStructure struct { jsonstructure *jsonStructure i2pcontrolhost string @@ -14,6 +16,10 @@ func (i *i2pControlStructure) i2pControlPort() string{ return i.i2pcontrolport } +func (i *i2pControlStructure) Echo(s string) i2pControlStructure { + fmt.Println(i.jsonstructure.Echo("echo", "")) +} + func (i *i2pControlStructure) i2pControl() i2pControlStructure { return *i } diff --git a/example/demo.go b/example/demo.go index fd44577..51856fd 100644 --- a/example/demo.go +++ b/example/demo.go @@ -15,5 +15,5 @@ func main(){ i2pcontrolhost := *AddrString i2pcontrolport := *PortString auth := i2pcontrol.NewI2pControl(i2pcontrolhost, i2pcontrolport) - auth.Echo() + auth.Echo("test") } diff --git a/json.go b/json.go index 9ec3bfe..fe3199b 100644 --- a/json.go +++ b/json.go @@ -31,7 +31,7 @@ func (j *jsonStructure) jsonStructure() jsonStructure { return *j } -func newJsonStructure() *jsonStructure { +func NewJsonStructure() *jsonStructure { var j jsonStructure return &j }