You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
558 B
29 lines
558 B
// 包名
|
|
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"./sm"
|
|
"io/ioutil"
|
|
"encoding/json"
|
|
"./path"
|
|
fuck "./sm/fuck"
|
|
)
|
|
|
|
func main() {
|
|
fmt.Println(fuck.Add(1,2))
|
|
fmt.Println(sm.Addd(1,2))
|
|
fmt.Println("Hello, World!")
|
|
// 要使用这个方法的话需要一起编译,先用go build .
|
|
// test()
|
|
var parhArray = path.Output("./data")
|
|
fmt.Println(parhArray[0])
|
|
str := "./"+parhArray[0]
|
|
jsondata, _ := ioutil.ReadFile(str)
|
|
var user []map[string][]int
|
|
err := json.Unmarshal(jsondata, &user)
|
|
if err != nil {
|
|
fmt.Println(err)
|
|
}
|
|
fmt.Println(user[2]["one"])
|
|
}
|
|
|