https://www.devglan.com/spring-boot/spring-websocket-integration-example-without-stomp
Spring Boot + WebSocket example without STOMP and SockJs
Leave a reply
https://www.devglan.com/spring-boot/spring-websocket-integration-example-without-stomp
示例json:
{
"status": "ok",
"data": [{
"id": 1,
"name": "zhangsan"
},
{
"id": 2,
"name": "wangwu"
}
]
}
1 直接格式化打印
at ./test.json | jq .
{
"status": "ok",
"data": [
{
"id": 1,[......]
// Check Args
if len(os.Args) != 2 {
fmt.Println("Usage xxx <arg1> <arg2>")
return
}
arg1 := os.Args[1]
arg1 := os.Args[2]
[......]
可以使用go proxy:https://goproxy.io/zh/
export GO111MODULE=on
export GOPROXY=https://goproxy.io,direct
然后执行go get
go mod init github.com/my/repo
go get github.com/go-redis/redis/v8
[......]