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
https://en.wikibooks.org/wiki/Go_Programming_Language_Cookbook

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

Opening

Opening a FileEdit

And this is how to open a file.


Incrementing a counter

Incrementing a counterEdit

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