Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/neilkuan/learn-golang


https://github.com/neilkuan/learn-golang

Last synced: 9 days ago
JSON representation

Awesome Lists containing this project

README

        

# This repo just for learn golang for beginner learn-golang

```bash
# test.go
# `package`
# go run: cannot run non-main package
# func format need complete with "ansi c" .

go run test.go

---
Hello world
```

if else to check object Type.
```go
package main

import (
"fmt"
"math/rand"
"reflect"
)

func main() {
hell := rand.Intn(1)
hellt := reflect.TypeOf(hell).Kind()
fmt.Println(hellt)
if hellt == reflect.Int {
fmt.Println("hell is: ", reflect.Int)
}
}
```