Table of Contents

Go - Function

Syntax

func (file *File) Write(b []byte) (n int, err error)

where:

Parameters

As a map is a reference, a function receives a copy of the map reference (not of the data). So any changes the called function makes to the underlying data structure are also be visible through the caller’s map reference too.

Comment

Write a comment before the declaration of each function to specify its behavior. These conventions are important, because they are used by tools like go doc and godoc to locate and display documentation.