# Go工具包 **Repository Path**: satyr/tools ## Basic Information - **Project Name**: Go工具包 - **Description**: 整合Go基础工具包。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-12-19 - **Last Updated**: 2022-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 工具包使用方法 ```go // 初始化 Init() // 加载配置文件 config.LoadConfig("conf/test.toml") logger.InitLogger(conf.Configuration().Logger) ``` # API请求 - POST方式 > Content-Type", "application/json" ```go type Respond struct { ErrNo int `json:"err_no"` ErrMsg string `json:"err_msg"` Results interface{} `json:"results"` } resp := Respond httpCtx := ctx.NewHTTPContext() address := []string{"http://127.0.0.1"} uri := "/api/v1/user/get" body := nil err := api.Call(httpCtx, header, address, uri, body, &resp) ```