Re: [go-nuts] type definitions and original types

2018-02-10 Thread 'Axel Wagner' via golang-nuts
On Sun, Feb 11, 2018 at 7:27 AM, rajesh nataraja wrote: > Compiler does not allow this, aren't they essentially all the same? What > is the reason this is not allowed? > Go is strictly typed. As such, it limits conversions (much more automatic ones) between types that are not the same. Types are

[go-nuts] type definitions and original types

2018-02-10 Thread rajesh nataraja
I have the following definied in package a type T1 { a t1 } type T2 { b T1 } In a package b I do the following type newt1 a.T1 type newt2 a.T2 func foo() { x newt1 y newt2 x.b = y } Compiler does not allow this, aren't they essentially all the same? What is the r

Re: [go-nuts] Built-in log Package

2018-02-10 Thread Bret Jordan
I know this thread is old... But for people that are looking for some simple logging by level functionality I have added basic logging levels to the default Go log package. You can find my changes here: https://github.com/gologme/log In addition to adding Info, Warn, and Debug, users can also

[go-nuts] gRPC SSL certs...need help generating some...

2018-02-10 Thread Curtis Paul
I have working gRPC code where a client is sending data to a server. Works fine when not using TLS. I used this example to generate keys using openssl. My golang code for client and server TLS communication is essentially the same as in this example. I used the example's openssl method to gener

Re: [go-nuts] Wrapping executable that takes input and output files such that it uses stdin and stdout instead (using named pipes)

2018-02-10 Thread Or Rikon
I actually fixed this a couple of days ago (see here ) without realizing what the issue was, but now I understand! Thank you! On Fri, Feb 9, 2018 at 10:27 PM Matt Harden wrote: > You need to close fIn after the copy is done. As it is now, fIn.Close() > ha