Golang Tips

on

Reference: http://dave.cheney.net/2013/04/30/curious-channels

– A closed channel never blocks

– A nil channel always blocks

Reference: The Little Go Book

…you can only declare variable once and := does declare the variable) and fundamental understanding (like new(X) or &X{} only allocate memory, but slices, maps and channels require more initialization and thus, make ).

Reference: http://spf13.com/presentation/7-biggest-mistakes-in-go/

– Mistake 1: Not Accepting Interfaces

– Mistake 2: Thinking Of Errors As Strings

– Mistake 3: Requring Broad Interfaces

– Mistake 4: Methods Vs Functions

– Mistake 5: Pointers Vs Values

– Mistake 6: Not Using Io.Reader & Io.Writer

– Mistake 7: Ignoring Concurrent Access

Reference: https://github.com/b3log/wide

Web-based Golang IDE

 

Advertisements

Subjectivity aside, leave a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s