hello

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const HelloWorld string = "Hello, World!"

Constants can be character, string, boolean, or numeric values.

View Source
const Pi = 3.14

Variables

View Source
var (
	ToBe   bool   = false
	MaxInt uint64 = 1<<64 - 1
)

"factored" variable declarations

Functions

func Add

func Add(x, y int) int

A function can take zero or more arguments.

When two or more consecutive named function parameters share a type,

you can omit the type from all but the last.

func PrintBasicTypesExample

func PrintBasicTypesExample()

func Random added in v0.0.2

func Random(n int) int

In Go, a name is "exported" if it begins with a capital letter.

func Split

func Split(sum int) (x, y int)

Named return

These names should be used to document the meaning of the return values.

func Swap

func Swap(a, b string) (string, string)

A function can return any number of results.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL