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
- Host: GitHub
- URL: https://github.com/mmsaki/golang-basics
- Owner: mmsaki
- Created: 2023-07-26T02:15:35.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-26T02:27:53.000Z (almost 3 years ago)
- Last Synced: 2025-02-13T05:45:39.270Z (over 1 year ago)
- Topics: golang, programming-language
- Language: Go
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```