Go Programming Language Cookbook/Printable version

Go Programming Language Cookbook

The current, editable version of this book is available in Wikibooks, the open-content textbooks collection, at

Permission is granted to copy, distribute, and/or modify this document under the terms of the Creative Commons Attribution-ShareAlike 3.0 License.


Opening a File edit

And this is how to open a file.

Incrementing a counter

Incrementing a counter edit

  i += 1;  /* i = i + 1;  */
  i++;     /* same result */