w1100n
This site is best viewed in Google Chrome
1/21/2019 15:05

https://colobu.com/2017/06/21/json-tricks-in-Go/

type Result struct {
    Count int `json:"count"`
}

func main() {
    out := shellExec(shell)
    var result Result
    json.Unmarshal([]byte(out), &result)
    fmt.Println(result.Count)
}

<< Previous Posts Newer Posts >>
辽ICP备14012896