{"id":20430925,"url":"https://github.com/xwi88/config4go","last_synced_at":"2026-04-19T02:02:51.737Z","repository":{"id":57529563,"uuid":"162877461","full_name":"xwi88/config4go","owner":"xwi88","description":"config files read for go with module support, if want vendor dir ref https://github.com/xwi88/config","archived":false,"fork":false,"pushed_at":"2020-05-02T14:49:14.000Z","size":15,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-15T17:36:59.200Z","etag":null,"topics":["config","go","json","module","toml","yaml"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xwi88.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-23T09:20:46.000Z","updated_at":"2020-05-01T15:21:04.000Z","dependencies_parsed_at":"2022-08-26T05:10:26.063Z","dependency_job_id":null,"html_url":"https://github.com/xwi88/config4go","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwi88%2Fconfig4go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwi88%2Fconfig4go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwi88%2Fconfig4go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwi88%2Fconfig4go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xwi88","download_url":"https://codeload.github.com/xwi88/config4go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241975134,"owners_count":20051428,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["config","go","json","module","toml","yaml"],"created_at":"2024-11-15T08:09:36.238Z","updated_at":"2026-04-19T02:02:51.620Z","avatar_url":"https://github.com/xwi88.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# config\n\nIf you use govendor or blocked by the GFW, you can ref `https://github.com/xwi88/config`.\n\nThe rep support module and without vendor dir.\n\n## support\n\nsupport files with extension: json, toml, yaml, yml, properties, props, prop, hcl.\n\n## usage\n\n`go get -u github.com/xwi88/config4go`\n\n## tips\n\nIf go get timeout, you can try set follows:\n\n```bash\nexport GO111MODULE=on #go1.12 default set on\nexport GOPROXY=https://goproxy.io\n```\n\n## example\n\n```go\n\ttype redisOptions struct {\n\t\tHost        string\n\t\tPort        string\n\t\tPassword    string\n\t\tIdleTimeout int\n\t\tMaxIdle     int\n\t\tMaxActive   int\n\t}\n\n\ttype testConf struct {\n\t\tName  string\n\t\tRedis redisOptions\n\t}\n\n\tvar conf map[string]interface{}\n\n\ttestfile := \"./testdata/app_test.toml\"\n\terr := LoadConfig(testfile, \u0026conf)\n\tif err != nil {\n\t\t// some deal\n    }\n    \n    fmt.Println(conf.Host)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwi88%2Fconfig4go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxwi88%2Fconfig4go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwi88%2Fconfig4go/lists"}