{"id":41281158,"url":"https://github.com/plimble/goconf","last_synced_at":"2026-01-23T02:51:20.505Z","repository":{"id":57589305,"uuid":"92449698","full_name":"plimble/goconf","owner":"plimble","description":"Go config library","archived":false,"fork":false,"pushed_at":"2019-02-26T00:42:45.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-21T10:15:45.084Z","etag":null,"topics":["config","golang"],"latest_commit_sha":null,"homepage":null,"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/plimble.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":"2017-05-25T22:31:35.000Z","updated_at":"2021-12-31T19:06:50.000Z","dependencies_parsed_at":"2022-09-26T19:34:35.284Z","dependency_job_id":null,"html_url":"https://github.com/plimble/goconf","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/plimble/goconf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plimble%2Fgoconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plimble%2Fgoconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plimble%2Fgoconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plimble%2Fgoconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plimble","download_url":"https://codeload.github.com/plimble/goconf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plimble%2Fgoconf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28679138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"online","status_checked_at":"2026-01-23T02:00:08.296Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","golang"],"created_at":"2026-01-23T02:51:19.393Z","updated_at":"2026-01-23T02:51:20.452Z","avatar_url":"https://github.com/plimble.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"goconf\n---\n[![GoDoc](https://godoc.org/plimble/goconf?status.svg)](https://godoc.org/github.com/plimble/goconf)\n[![Build Status](https://travis-ci.org/plimble/goconf.svg?branch=master)](https://travis-ci.org/plimble/goconf?branch=master)\n[![Coverage Status](https://coveralls.io/repos/plimble/goconf/badge.svg?branch=master\u0026service=github\u0026foo)](https://coveralls.io/github/plimble/goconf?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/plimble/goconf)](https://goreportcard.com/report/plimble/goconf)\n\nCombine yaml and environment config\n\n## Features\n- [Parse yaml](gopkg.in/yaml.v2)\n- [Parse env](github.com/kelseyhightower/envconfig)\n- Watch yaml config file\n\n## Installation\n\n```\ngo get gopkg.in/plimble/goconf.v1\n```\n\n## Env format\n\n```go\ntype SampleA struct {\n\tA               string // PREFIX_A\n\tCamelCase       bool // PREFIX_CAMELCASE\n\tManualOverride1 string `envconfig:\"manual_override_1\"` // PREFIX_MANUAL_OVERRIDE_1\n\tSplitWord1      string `split_words:\"true\"` // SPLIT_WORD1\n\tID              string // PREFIX_ID\n\tDefaultValue    string `envconfig:\"DEFAULT_VALUE\"` // PREFIX_DEFAULT_VALUE\n}\n```\n## Yaml format\n\n```go\ntype SampleA struct {\n\tA               string `json:\"abc\"` // abc\n\tCamelCase       bool `yaml:\"cc\"` // cc\n\tManualOverride1 string // manualoverride1\n\tSplitWord1      string // splitword1\n\tID              string // id\n\tDefaultValue    string // defaultvalue\n}\n```\n\n## Example\n\n```go\n\ntype Sample struct {\n  Value string\n}\n\nvar bytes = `\nvalue: v1\n`\n\nsample := \u0026Sample{}\n// Parse Order: yaml bytes -\u003e yaml file -\u003e env\nerr = goconf.Parse(sample,\n    WithEnv(\"prefix\"),\n    WithYamlFromBytes(bytes),\n    WithYaml(\"path.yml\"),\n)\n```\n\n## Watch Config\n\n```go\n\ngoconf.WatchYamlFile(\"path.yml\", sample, func() error {\n  fmt.Println(\"event on chane\")\n  return nil\n})\n\n// or ignore event\ngoconf.WatchYamlFile(\"path.yml\", sample, nil)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplimble%2Fgoconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplimble%2Fgoconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplimble%2Fgoconf/lists"}