[go-nuts] Not able to connect with mysql database

2019-10-11 Thread Sarchcheelanbca Bala
Hi Team am not able to connect my go program with mysql. Getting the below 
error.

I have attached main.go file for your reference


2019/10/11 17:11:42 http: panic serving [::1]:59577: Error 1045: Access 
denied for user 'root'@'localhost' (using password: YES)
goroutine 74 [running]:
net/http.(*conn).serve.func1(0xc4ae60)
c:/go/src/net/http/server.go:1767 +0x140
panic(0x771740, 0xcce400)
c:/go/src/runtime/panic.go:679 +0x1c0
main.Index(0x8828a0, 0xc000284000, 0xcc0600)
c:/go/firstsql/main.go:36 +0x4e4
net/http.HandlerFunc.ServeHTTP(0x8192a0, 0x8828a0, 0xc000284000, 
0xcc0600)
c:/go/src/net/http/server.go:2007 +0x4b
net/http.(*ServeMux).ServeHTTP(0xade820, 0x8828a0, 0xc000284000, 
0xcc0600)
c:/go/src/net/http/server.go:2387 +0x1c4
net/http.serverHandler.ServeHTTP(0xc00015e000, 0x8828a0, 0xc000284000, 
0xcc0600)
c:/go/src/net/http/server.go:2802 +0xab
net/http.(*conn).serve(0xc4ae60, 0x883020, 0xc3c8c0)
c:/go/src/net/http/server.go:1890 +0x87c
created by net/http.(*Server).Serve
c:/go/src/net/http/server.go:2927 +0x395
2019/10/11 17:11:42 http: panic serving [::1]:59581: Error 1045: Access 
denied for user 'root'@'localhost' (using password: YES)
goroutine 31 [running]:
net/http.(*conn).serve.func1(0xc0001d43c0)
c:/go/src/net/http/server.go:1767 +0x140
panic(0x771740, 0xcc8280)
c:/go/src/runtime/panic.go:679 +0x1c0
main.Index(0x8828a0, 0xc0001dc1c0, 0xce2500)
c:/go/firstsql/main.go:36 +0x4e4
net/http.HandlerFunc.ServeHTTP(0x8192a0, 0x8828a0, 0xc0001dc1c0, 
0xce2500)
c:/go/src/net/http/server.go:2007 +0x4b
net/http.(*ServeMux).ServeHTTP(0xade820, 0x8828a0, 0xc0001dc1c0, 
0xce2500)
c:/go/src/net/http/server.go:2387 +0x1c4
net/http.serverHandler.ServeHTTP(0xc00015e000, 0x8828a0, 0xc0001dc1c0, 
0xce2500)
c:/go/src/net/http/server.go:2802 +0xab
net/http.(*conn).serve(0xc0001d43c0, 0x883020, 0xcec340)
c:/go/src/net/http/server.go:1890 +0x87c
created by net/http.(*Server).Serve
c:/go/src/net/http/server.go:2927 +0x39

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c46a6b48-1109-4698-ac21-c7f04464b936%40googlegroups.com.


main.go
Description: Binary data


AW: [go-nuts] Not able to connect with mysql database

2019-10-11 Thread Lutz Horn
Does the user 'root' have the permission to access the database on the MySQL 
server running on 'localhost'?

Note that this is not a Go problem but a MySQL problem. You should try to 
access the database using the mysql command line client berfore using it in an 
application.

Lutz


Von: golang-nuts@googlegroups.com  im Auftrag von 
Sarchcheelanbca Bala 
Gesendet: Freitag, 11. Oktober 2019 13:49
An: golang-nuts
Betreff: [go-nuts] Not able to connect with mysql database

Hi Team am not able to connect my go program with mysql. Getting the below 
error.

I have attached main.go file for your reference


2019/10/11 17:11:42 http: panic serving [::1]:59577: Error 1045: Access denied 
for user 'root'@'localhost' (using password: YES)
goroutine 74 [running]:
net/http.(*conn).serve.func1(0xc4ae60)
c:/go/src/net/http/server.go:1767 +0x140
panic(0x771740, 0xcce400)
c:/go/src/runtime/panic.go:679 +0x1c0
main.Index(0x8828a0, 0xc000284000, 0xcc0600)
c:/go/firstsql/main.go:36 +0x4e4
net/http.HandlerFunc.ServeHTTP(0x8192a0, 0x8828a0, 0xc000284000, 0xcc0600)
c:/go/src/net/http/server.go:2007 +0x4b
net/http.(*ServeMux).ServeHTTP(0xade820, 0x8828a0, 0xc000284000, 0xcc0600)
c:/go/src/net/http/server.go:2387 +0x1c4
net/http.serverHandler.ServeHTTP(0xc00015e000, 0x8828a0, 0xc000284000, 
0xcc0600)
c:/go/src/net/http/server.go:2802 +0xab
net/http.(*conn).serve(0xc4ae60, 0x883020, 0xc3c8c0)
c:/go/src/net/http/server.go:1890 +0x87c
created by net/http.(*Server).Serve
c:/go/src/net/http/server.go:2927 +0x395
2019/10/11 17:11:42 http: panic serving [::1]:59581: Error 1045: Access denied 
for user 'root'@'localhost' (using password: YES)
goroutine 31 [running]:
net/http.(*conn).serve.func1(0xc0001d43c0)
c:/go/src/net/http/server.go:1767 +0x140
panic(0x771740, 0xcc8280)
c:/go/src/runtime/panic.go:679 +0x1c0
main.Index(0x8828a0, 0xc0001dc1c0, 0xce2500)
c:/go/firstsql/main.go:36 +0x4e4
net/http.HandlerFunc.ServeHTTP(0x8192a0, 0x8828a0, 0xc0001dc1c0, 0xce2500)
c:/go/src/net/http/server.go:2007 +0x4b
net/http.(*ServeMux).ServeHTTP(0xade820, 0x8828a0, 0xc0001dc1c0, 0xce2500)
c:/go/src/net/http/server.go:2387 +0x1c4
net/http.serverHandler.ServeHTTP(0xc00015e000, 0x8828a0, 0xc0001dc1c0, 
0xce2500)
c:/go/src/net/http/server.go:2802 +0xab
net/http.(*conn).serve(0xc0001d43c0, 0x883020, 0xcec340)
c:/go/src/net/http/server.go:1890 +0x87c
created by net/http.(*Server).Serve
c:/go/src/net/http/server.go:2927 +0x39

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c46a6b48-1109-4698-ac21-c7f04464b936%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/VI1PR06MB5150B886F882E95DF7B43B319E970%40VI1PR06MB5150.eurprd06.prod.outlook.com.


[go-nuts] Golang Network Proxy programming.

2019-10-11 Thread mikeepps756
Hello,
As a new golang user who wants to program go proxies,vpns to bypass 
censorship.
What areas should I focus on while learning go.
Should I stick to the net package or do I have to learn the whole standard 
lib of the language.
thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/74e849ad-cf90-4f05-98c5-164052caae97%40googlegroups.com.


Re: [go-nuts] [ANN] go-resty v2.1.0 released - Simple HTTP and REST client library

2019-10-11 Thread Sam Whited



On Fri, Oct 11, 2019, at 20:55, Dimas Prawira wrote:
> Stable Version : github.com/go-resty/resty/v2
>
> got 404 (not found)

That is a Go import line with a module major version suffix, not a
GitHub URL. The fact that they look the same instead of using some other
syntax is extremely annoying, but we're stuck with it, unfortunately.

—Sam

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c11eb80d-b2df-4793-804f-3017a2e81dca%40www.fastmail.com.


[go-nuts] Go 1.13.2 and Go 1.12.11 pre-announcement

2019-10-11 Thread Katie Hockman
Hello gophers,

We plan to issue Go 1.13.2 and Go 1.12.11 on Wednesday, October 16.
These are minor releases to fix security issues.

Following our policy at https://golang.org/security,
this is the pre-announcement of those releases.

Cheers,
Katie on behalf of the Go team

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CALvTBvcEfcU2E%2BRZE9CXW5n%3DPu0W%2Brpq6U-zdW2_Sk-XcQRnFQ%40mail.gmail.com.


[go-nuts] geocrypt package

2019-10-11 Thread Dan Kortschak
Over 10 years ago Gustavo Niemeyer invented the geohash geographic
hashing system https://en.wikipedia.org/wiki/Geohash for clearly and
concisely representing geographic locations at arbitrary precision.

Now, here is geocrypt, a package that returns or checks a cryptographic
hash of a geolocation. The hash is calculated using bcrypt in such a
way that hashing an angular area is approximately time-constant
irrespective of the geohash precision that the location is given.

The intention is for use in confirming locations of items whose
location should not be published, but which must be identifiable by
some participant. Examples of use are digital geocaching competitions,
lowish value eco-conservation sites* etc.

For locations at the equator (fastest case), hashing takes about 2-3
seconds per square meter of precision on my hardware. Interaction
between geocrypt and standard conservation location fuzzing techniques
means that they should probably not used together. As in all cases with
cryptographic protocols, you should assess your threat model, and don't
use packages you find on the internet.

https://godoc.org/github.com/kortschak/geocrypt

* high value conservation sites should not be published

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/181e535f6ab8c1ed2a36913132fe212aeaff03da.camel%40kortschak.io.


Re: [go-nuts] [ANN] go-resty v2.1.0 released - Simple HTTP and REST client library

2019-10-11 Thread Sam Whited
On Fri, Oct 11, 2019, at 21:24, Dimas Prawira wrote:
> Just test using got get

You appear to be using an old version of Go that doesn't support modules
or have it turned off or set to auto using the GO111MODULE environment
variable. If you upgrade to Go 1.13 and make sure GO111MODULE isn't set,
it should default to being on.

https://github.com/go-resty/resty/blob/v2.0.0/go.mod

—Sam

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/0cab0ea1-d1d1-4121-ac8e-cecb104fd573%40www.fastmail.com.


Re: [go-nuts] [ANN] go-resty v2.1.0 released - Simple HTTP and REST client library

2019-10-11 Thread Dimas Prawira
Thanks, I'll check it out.

Cheers
Dimas

On Sat, Oct 12, 2019 at 4:32 AM Sam Whited  wrote:

> On Fri, Oct 11, 2019, at 21:24, Dimas Prawira wrote:
> > Just test using got get
>
> You appear to be using an old version of Go that doesn't support modules
> or have it turned off or set to auto using the GO111MODULE environment
> variable. If you upgrade to Go 1.13 and make sure GO111MODULE isn't set,
> it should default to being on.
>
> https://github.com/go-resty/resty/blob/v2.0.0/go.mod
>
> —Sam
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CA%2Bp%2BMUeid3NChc0Uc9rB2mGvkujTL%3DYOHnbVg93H5HDC6RfQFw%40mail.gmail.com.


[go-nuts] Re: Is there anything wrong with proxy.glang.org?

2019-10-11 Thread ankushc via golang-nuts
Are you using Go 1.13? Version validation is done as part of Go 1.13 (
https://golang.org/doc/go1.13#modules). In Go 1.12, this would have 
succeeded.

However, if a goproxy has this version, then a go get will be successful. 
Example: https://search.gocenter.io/github.com~2Fbilibili~2Fkratos/info

You can set GOPROXY to https://gocenter.io to be unblocked but would 
encourage you to follow up with the module author to get their dependencies 
fixed.


On Friday, September 27, 2019 at 12:24:09 AM UTC-7, Darren Hoo wrote:
>
> Try to get this package:
>
> $ go get -u github.com/bilibili/kratos/tool/kratos
>  
>
>> go: finding github.com/bilibili/kratos v0.2.3
>> go: downloading github.com/bilibili/kratos v0.2.3
>> go: extracting github.com/bilibili/kratos v0.2.3
>> go get: github.com/bilibili/kratos@v0.2.3 requires
>> golang.org/x/time@v0.0.0-20190513212739-9d24e82272b4: invalid 
>> pseudo-version: does not match version-control timestamp 
>> (2019-03-08T20:28:27Z)
>
>
> it reports  
>
> golang.org/x/time@v0.0.0-20190513212739-9d24e82272b4: invalid 
>> pseudo-version: does not match version-control timestamp 
>> (2019-03-08T20:28:27Z)
>
>
> go get trying to access this url: 
> https://proxy.golang.org/golang.org/x/time/@v/v0.0.0-20190513212739-9d24e82272b4.mod
>   
>  
>
> it returns
>
> *not found: golang.org/x/time@v0.0.0-20190513212739-9d24e82272b4 
>> : invalid 
>> pseudo-version: does not match version-control timestamp 
>> (2019-03-08T20:28:27Z)*
>
>
> While both (replace proxy.golang.org with goproxy.io or goproxy.cn)
>
>
> https://goproxy.io/golang.org/x/time/@v/v0.0.0-20190513212739-9d24e82272b4.mod
>   
>  
>
> https://goproxy.cn/golang.org/x/time/@v/v0.0.0-20190513212739-9d24e82272b4.mod
>   
>  
>
> returns OK with: 
>
> *module golang.org/x/time *
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/644e4a4a-0ed0-4b4e-98b7-99d8b01e2bb1%40googlegroups.com.


Re: [go-nuts] geocrypt package

2019-10-11 Thread Robert Engels
Cool stuff!

> On Oct 11, 2019, at 4:22 PM, Dan Kortschak  wrote:
> 
> Over 10 years ago Gustavo Niemeyer invented the geohash geographic
> hashing system https://en.wikipedia.org/wiki/Geohash for clearly and
> concisely representing geographic locations at arbitrary precision.
> 
> Now, here is geocrypt, a package that returns or checks a cryptographic
> hash of a geolocation. The hash is calculated using bcrypt in such a
> way that hashing an angular area is approximately time-constant
> irrespective of the geohash precision that the location is given.
> 
> The intention is for use in confirming locations of items whose
> location should not be published, but which must be identifiable by
> some participant. Examples of use are digital geocaching competitions,
> lowish value eco-conservation sites* etc.
> 
> For locations at the equator (fastest case), hashing takes about 2-3
> seconds per square meter of precision on my hardware. Interaction
> between geocrypt and standard conservation location fuzzing techniques
> means that they should probably not used together. As in all cases with
> cryptographic protocols, you should assess your threat model, and don't
> use packages you find on the internet.
> 
> https://godoc.org/github.com/kortschak/geocrypt
> 
> * high value conservation sites should not be published
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/181e535f6ab8c1ed2a36913132fe212aeaff03da.camel%40kortschak.io.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/4DE85A6D-16FF-45B2-AD77-DDE17744851C%40ix.netcom.com.


[go-nuts] How to invoke child 'go' process in playground?

2019-10-11 Thread Xiangdong JI
Hi,

Given a command execution like "cmd := exec.CommandContext(ctx, "go", 
"run", file)" playground reports the following error:

child error: exec: "go": executable file not found in $PATH


Could it be solved by specifying a full path for 'go', which path shall I 
use? Thanks a lot.

https://play.golang.org/p/6b79TLLCzfP

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/30f33420-47d9-4fe7-8e39-980f8d5370db%40googlegroups.com.


Re: [go-nuts] How to invoke child 'go' process in playground?

2019-10-11 Thread Kurtis Rader
The Go playground does not allow running arbitrary external commands. No
doubt primarily for security reasons. But also because the playground
environment is not a complete virtualized OS. For example, try to execute

exec.Command("/bin/ls", "-la")

You'll get a "not implemented on nacl" error. See
https://blog.golang.org/playground

On Fri, Oct 11, 2019 at 8:34 PM Xiangdong JI  wrote:

> Hi,
>
> Given a command execution like "cmd := exec.CommandContext(ctx, "go",
> "run", file)" playground reports the following error:
>
> child error: exec: "go": executable file not found in $PATH
>
>
> Could it be solved by specifying a full path for 'go', which path shall I
> use? Thanks a lot.
>
> https://play.golang.org/p/6b79TLLCzfP
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/30f33420-47d9-4fe7-8e39-980f8d5370db%40googlegroups.com
> 
> .
>


-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD8_uGWv2AORkg%2ByPxxr4o%2BhuSoqnP6CxwAhZcTdspB5kg%40mail.gmail.com.


Re: [go-nuts] How to invoke child 'go' process in playground?

2019-10-11 Thread Xiangdong JI
Thanks Kurtis.

On Saturday, October 12, 2019 at 12:09:52 PM UTC+8, Kurtis Rader wrote:
>
> The Go playground does not allow running arbitrary external commands. No 
> doubt primarily for security reasons. But also because the playground 
> environment is not a complete virtualized OS. For example, try to execute
>
> exec.Command("/bin/ls", "-la")
>
> You'll get a "not implemented on nacl" error. See 
> https://blog.golang.org/playground
>
> On Fri, Oct 11, 2019 at 8:34 PM Xiangdong JI  > wrote:
>
>> Hi,
>>
>> Given a command execution like "cmd := exec.CommandContext(ctx, "go", 
>> "run", file)" playground reports the following error:
>>
>> child error: exec: "go": executable file not found in $PATH
>>
>>
>> Could it be solved by specifying a full path for 'go', which path shall I 
>> use? Thanks a lot.
>>
>> https://play.golang.org/p/6b79TLLCzfP
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golan...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/30f33420-47d9-4fe7-8e39-980f8d5370db%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> Kurtis Rader
> Caretaker of the exceptional canines Junior and Hank
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/8615b967-2026-485e-990f-d68cbd8b1538%40googlegroups.com.


Re: [go-nuts] [ANN] go-resty v2.1.0 released - Simple HTTP and REST client library

2019-10-11 Thread Jeevanandam M.
Thank you Sam for responding to the query.

@Dimas - You could use Resty library via go mod as well as without it.

If you would like to use Resty v2, it is exists on master so simple do "go 
get github.com/go-resty/resty". You will get v2 code base.

If you would like to use it with go mod, you need to have respective go 
version that supports module feature (
https://github.com/go-resty/resty#supported-go-versions) as described in 
the readme. 

I hope it helps.

- Jeeva


On Friday, October 11, 2019 at 2:50:26 PM UTC-7, Dimas Prawira wrote:
>
> Thanks, I'll check it out. 
>
> Cheers
> Dimas
>
> On Sat, Oct 12, 2019 at 4:32 AM Sam Whited  > wrote:
>
>> On Fri, Oct 11, 2019, at 21:24, Dimas Prawira wrote:
>> > Just test using got get
>>
>> You appear to be using an old version of Go that doesn't support modules
>> or have it turned off or set to auto using the GO111MODULE environment
>> variable. If you upgrade to Go 1.13 and make sure GO111MODULE isn't set,
>> it should default to being on.
>>
>> https://github.com/go-resty/resty/blob/v2.0.0/go.mod
>>
>> —Sam
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/37d9f556-d3a3-4728-932d-c54d67a017b4%40googlegroups.com.