Go Programming Language Cookbook/Printable version

From Wikibooks, open books for an open world
Jump to navigation Jump to search

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 | edit source]

And this is how to open a file.

Incrementing a counter

Incrementing a counter[edit | edit source]

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