An open API service indexing awesome lists of open source software.

https://github.com/mmsaki/golang-basics

Beginners learning golang
https://github.com/mmsaki/golang-basics

golang programming-language

Last synced: about 1 year ago
JSON representation

Beginners learning golang

Awesome Lists containing this project

README

          

# golang-basics

1. Create [`/packages.go`](./packages.go) and declare package
```go
package main
```

1. Declare imports

```go
// ./package.go
package main

import (
"fmt"
"math"
)
```

1. Declare main function

```go
package main

import (
"fmt"
"math"
)

func main() {
fmt.Printf("Now you have %g problems. \n", math.Sqrt(7))
}
```

1. Run program

```sh
go run packages.go
```