orestonce
orestonce
* input ```` [{ "UserId" : [ 10 ] }, { "UserId" : [ 12.3 ] }] ```` * current output: ```` type AutoGenerated []struct { UserID []int `json:"UserId"` }...
https://www.cnblogs.com/37Y37/p/12020603.html 
* startWG.Done does not ensure that s.Start() returns to completion, nor does it ensure that the writing of `errs
1. getHost的时候应该使用 path.Dir,而不是filepath.Dir, 具体看 go/src/path/filepath/path.go:9 的注释 //To process paths such as URLs // that always use forward slashes regardless of the operating // system, see the path package. * 在windows下filepath包处理出来的是反斜杠(`\`)...
https://github.com/sodaling/FastestBilibiliDownloader/blob/036fd690b4430d7ad3e9fa4c6842df4dfaa17948/cmd/start-concurrent-engine.go#L60 ````go aid, _ = strconv.ParseInt(strings.TrimPrefix(params[1], "av"), 10, 64) ````
* The model file is download from https://bj.bcebos.com/paddle2onnx/model_zoo/ch_ppocr_mobile_v2.0_cls_infer.onnx ```` package main import ( _ "embed" "fmt" "github.com/owulveryck/onnx-go" "github.com/owulveryck/onnx-go/backend/x/gorgonnx" ) //go:embed model/ch_ppocr_mobile_v2.0_cls_infer.onnx var gModelData []byte func main() { // Create a...
* input ```` curl -X POST https://www.google.com --data-raw 'id=ae94cfbb-38b0-4b0c-bcff-2cb866a742fa' ```` * expect output: ```` // Generated by curl-to-Go: https://mholt.github.io/curl-to-go resp, err := http.Post("https://www.google.com", "", strings.NewReader("id=ae94cfbb-38b0-4b0c-bcff-2cb866a742fa")) if err != nil {...
代码质量控制建议
1. 编写测试代码, 提高逻辑代码的测试覆盖率 2. 使用github action在每次推代码后,自动验证example里面的例子都能编译通过 3. 建议尽量支持低版本的golang,提高兼容性。我发现go1.12版本无法编译通过,这个也能使用github action自动检查