2025年6月22日

go 使用options扩展参数

摘要: package main import ( "fmt" ) type Config struct { path string isUseFile bool } type ConfigOption func(config *Config) error func WithPath(path string 阅读全文

posted @ 2025-06-22 16:17 王景迁 阅读(7) 评论(0) 推荐(0)

go url parse

摘要: url = schema(http/https) + "//" + host(ip:port/domain:port) + path(/xxx) + "?" + rawQuery(xxx=xxx) package main import ( "fmt" "net/url" ) func parseU 阅读全文

posted @ 2025-06-22 11:50 王景迁 阅读(15) 评论(0) 推荐(0)

导航