[Go] basics and web
This commit is contained in:
45
slides/go/main1.go
Normal file
45
slides/go/main1.go
Normal file
@@ -0,0 +1,45 @@
|
||||
//go:build exclude
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
|
||||
var a int
|
||||
var s string = "hello world " + "!!!"
|
||||
|
||||
var c = 5
|
||||
|
||||
a = a + 1
|
||||
|
||||
b := 1
|
||||
b := []byte(a)
|
||||
c := string(b)
|
||||
|
||||
_ = b
|
||||
_ = c
|
||||
|
||||
fmt.Println("Hello Wordl", "qwe")
|
||||
fmt.Println(s)
|
||||
|
||||
{
|
||||
d = d
|
||||
}
|
||||
|
||||
d := 5
|
||||
f(d)
|
||||
fmt.Println(a, "1")
|
||||
|
||||
|
||||
// std lib
|
||||
a : = []byte{1,2,3,4}
|
||||
fmt.Println(hex.EncodeToString(a))
|
||||
|
||||
crypto.MD5.New()
|
||||
|
||||
}
|
||||
|
||||
|
||||
func f(str *int) {
|
||||
a=1
|
||||
}
|
||||
Reference in New Issue
Block a user