[go-nuts] Go 2 generics, yet another view

2019-02-15 Thread 'Константин Иванов' via golang-nuts
Hi, all. Here is my view on Go 2 generics https://gist.github.com/logrusorgru/091282900712443ca78bbce0a71e41cc Please review and leave a feedback. I just want to share my thoughts on this. Nothing serious. -- You received this message because you are subscribed to the Google Groups "golang-n

[go-nuts] Parsing time zone +07:00

2019-07-02 Thread 'Константин Иванов' via golang-nuts
https://play.golang.org/p/4Rr2xVGKnQg package main import ( "fmt" "time" ) const in = "+03:00" // "2019-07-02T19:28:39.403+03:00" const TIME = "+07:00" // "2006-01-02T15:04:05.999+07:00" func main() { fmt.Println(time.Parse(TIME, in)) } Got << parsing time "+03:00" as "+07:00":

[go-nuts] Re: Parsing time zone +07:00

2019-07-02 Thread &#x27;Константин Иванов&#x27; via golang-nuts
*doing -- 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.c

Re: [go-nuts] Parsing time zone +07:00

2019-07-02 Thread &#x27;Константин Иванов&#x27; via golang-nuts
Thank you. вторник, 2 июля 2019 г., 22:26:39 UTC+4 пользователь mb0 написал: > > the format time uses a minus sign '-' instead of a plus > > https://play.golang.org/p/pXDXm0KmwTz > > have fun! > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group

[go-nuts] TCP Client can't dial to server on localhost: network is unreachable.

2016-09-22 Thread &#x27;Константин Иванов&#x27; via golang-nuts
Related to net package. Code works fine on playground: https://play.golang.org/p/1fCIZzaUIT But on local machine I've got (every time) 2016/09/22 20:37:30 listening on: 127.0.0.0:44327 2016/09/22 20:37:30 dialing 2016/09/22 20:37:30 dial error: dial tcp 127.0.0.0:44327: connect: network is unre

[go-nuts] Re: TCP Client can't dial to server on localhost: network is unreachable.

2016-09-22 Thread &#x27;Константин Иванов&#x27; via golang-nuts
uname -a Linux hpg6 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux -- 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 go

Re: [go-nuts] TCP Client can't dial to server on localhost: network is unreachable.

2016-09-22 Thread &#x27;Константин Иванов&#x27; via golang-nuts
ate. > > > On Thu, Sep 22, 2016 at 10:41 AM, 'Константин Иванов' via golang-nuts < > golan...@googlegroups.com > wrote: > >> Related to net package. >> >> Code works fine on playground: https://play.golang.org/p/1fCIZzaUIT >> >> But

[go-nuts] Re: printf in color

2016-11-06 Thread &#x27;Константин Иванов&#x27; via golang-nuts
Hello. I wrote the library that allows to use ANSI-colors (unix and win10+). It allows to use colored printf such as fmt.Priintf("neutral, red %d, cyan %d, bold %s", Red(35), Cyan(100), Bold( "bold")) Check it out https://github.com/logrusorgru/aurora The library doesn't support Windows. But Win

[go-nuts] How to compare two network addresses (stringifyed or not) for equality?

2017-06-03 Thread &#x27;Константин Иванов&#x27; via golang-nuts
Here is a code: package main import ( "fmt" "log" "net" ) func main() { l, err := net.Listen("tcp", "[::]:9090") if err != nil { log.Fatal(err) } defer l.Close() go func() { for { l.Accept() } }() c, err := net.Dial("

[go-nuts] Re: How to compare two network addresses (stringifyed or not) for equality?

2017-06-04 Thread &#x27;Константин Иванов&#x27; via golang-nuts
Ah, hell. Sorry, sorry, sorry. "[::]" is just ipv6 version of "0.0.0.0". Okay. Hah, and I can to use "[::0:0:1]:9090" or "[::0:1]:9090" or "[::1]:9090" and it will work. Hah, thank you man! Thank for you time. воскресенье, 4 июня 2017 г., 18:32:42 UTC+3 пользователь Silviu Capota Mera написал: