Julian Wiley

Introduction

<!-- A Sample Program -->

WARNING: Unported Hugo shortcode (manual conversion needed): {{< note title="Hello World">}}

A sample go program is show here.

package main

import "fmt"

func main() {
  message := greetMe("world")
  fmt.Println(message)
}

func greetMe(name string) string {
  return "Hello, " + name + "!"
}

Run the program as below:

$ go run hello.go

WARNING: Unported Hugo shortcode (manual conversion needed): {{< /note >}}

<!-- Declaring Variables -->

WARNING: Unported Hugo shortcode (manual conversion needed): {{< note title="Variables" >}}

Normal Declaration:

var msg string
msg = "Hello"

Shortcut:

msg := "Hello"

WARNING: Unported Hugo shortcode (manual conversion needed): {{< /note >}}

<!-- Declaring Constants -->

WARNING: Unported Hugo shortcode (manual conversion needed): {{< note title="Constants" >}}

const Phi = 1.618

WARNING: Unported Hugo shortcode (manual conversion needed): {{< /note >}}