随笔分类 -  Go程序设计

记录学习过程中的点点滴滴
摘要:package mypackage import ( "encoding/json" "fmt" "io/ioutil" "log" "os" "database/sql" _ "github.com/lib/pq" ) func LoadConfig(path string) Config { j 阅读全文
posted @ 2021-07-05 09:25 东宫得臣 阅读(1069) 评论(0) 推荐(0) 编辑
摘要:package main import ( "encoding/json" "fmt" "io/ioutil" "os" "strconv" "time" ) type ResponseStruct struct { Signs []Sign `json:"signs"` } type Sign s 阅读全文
posted @ 2021-07-05 09:04 东宫得臣 阅读(207) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> int main() { int v[] = {1, 2, 3, 4, 5}; for(auto& x:v) std::cout<<x<<" "; std::cout<<std::endl; return 0;} We use auto where we do 阅读全文
posted @ 2021-07-04 17:44 东宫得臣 阅读(139) 评论(0) 推荐(0) 编辑
摘要:package main import "fmt" func makeSet() *customSet { return &customSet{ container: make(map[string]struct{}), } } type customSet struct { container m 阅读全文
posted @ 2021-04-27 20:01 东宫得臣 阅读(76) 评论(0) 推荐(0) 编辑
摘要:package main import ( "fmt" "log" "os" "sync" "strings" "io/ioutil" "encoding/json" ) type demo struct { } type creStruct struct { Name string `json:" 阅读全文
posted @ 2021-03-31 08:58 东宫得臣 阅读(1313) 评论(0) 推荐(0) 编辑
摘要:package main import ( "fmt" "os" ) func main() { var s, sep string for i := 1; i < len(os.Args); i++ { s += sep + os.Args[i] sep = " " } fmt.Println(s 阅读全文
posted @ 2020-09-23 14:32 东宫得臣 阅读(311) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示