{"id":13756301,"url":"https://github.com/lytics/confl","last_synced_at":"2026-01-22T01:03:07.136Z","repository":{"id":21407871,"uuid":"24725853","full_name":"lytics/confl","owner":"lytics","description":"Config parser for go, modeled after Nginx format, Nice lenient syntax with Comments","archived":false,"fork":false,"pushed_at":"2020-03-13T15:42:45.000Z","size":242,"stargazers_count":139,"open_issues_count":2,"forks_count":20,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-08-13T19:20:19.424Z","etag":null,"topics":["config","configuration","golang"],"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/lytics.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":"2014-10-02T15:58:56.000Z","updated_at":"2024-12-10T13:19:31.000Z","dependencies_parsed_at":"2022-08-20T21:50:11.708Z","dependency_job_id":null,"html_url":"https://github.com/lytics/confl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lytics/confl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lytics%2Fconfl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lytics%2Fconfl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lytics%2Fconfl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lytics%2Fconfl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lytics","download_url":"https://codeload.github.com/lytics/confl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lytics%2Fconfl/sbom","scorecard":{"id":607594,"data":{"date":"2025-08-11","repo":{"name":"github.com/lytics/confl","commit":"08c6aed5f53f0224c850e5a1593b361513f6970e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 1/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T01:56:55.348Z","repository_id":21407871,"created_at":"2025-08-21T01:56:55.348Z","updated_at":"2025-08-21T01:56:55.348Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28648480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T21:29:11.980Z","status":"ssl_error","status_checked_at":"2026-01-21T21:24:31.872Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","configuration","golang"],"created_at":"2024-08-03T11:00:40.916Z","updated_at":"2026-01-22T01:03:07.112Z","avatar_url":"https://github.com/lytics.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"## Yet another Config Parser for go\n\nThis is a config parser most similar to Nginx, supports\nJson format, but with line-breaks, comments, etc.   Also, like\nNginx is more lenient.\n\nUses same syntax as https://github.com/vstakhov/libucl\n\n[![Code Coverage](https://codecov.io/gh/lytics/confl/branch/master/graph/badge.svg)](https://codecov.io/gh/lytics/confl)\n[![GoDoc](https://godoc.org/github.com/lytics/confl?status.svg)](http://godoc.org/github.com/lytics/confl)\n[![Build Status](https://travis-ci.org/lytics/confl.svg?branch=master)](https://travis-ci.org/lytics/confl)\n[![Go ReportCard](https://goreportcard.com/badge/lytics/confl)](https://goreportcard.com/report/lytics/confl)\n\n\n\nUse [SublimeText Nginx Plugin](https://github.com/brandonwamboldt/sublime-nginx) for formatting.\n\nCredit to [BurntSushi/Toml](https://github.com/BurntSushi/toml) and [Apcera/Gnatsd](https://github.com/apcera/gnatsd/tree/master/conf) from which \nthis was derived.\n\n### Other Options\nThere are a variety of options for config with comments in Go, this project started before some of them which are now probably better options:\n* https://github.com/hjson/hjson-go\n  * Similar to above?  https://github.com/tailscale/hujson \n* https://github.com/lalamove/konfig \n* https://github.com/hashicorp/hcl\n\n### Example\n\n```\n# nice, a config with comments!\n\n# support the name = value format\ntitle = \"conf Example\"\n# support json semicolon\ntitle2 : \"conf example2\"\n# support omitting = or : because key starts a line\ntitle3 \"conf example\"\n# note, we do not have to have quotes\ntitle4 = Without Quotes\n\n# for Sections we can use brackets\nhand {\n  name = \"Tyrion\"\n  organization = \"Lannisters\"\n  bio = \"Imp\"                 // comments on fields\n  dob = 1979-05-27T07:32:00Z  # dates, and more comments on fields\n}\n\n// Note, double-slash comment\n// section name/value that is quoted and json valid, including commas\naddress : {\n  \"street\"  : \"1 Sky Cell\",\n  \"city\"    : \"Eyre\",\n  \"region\"  : \"Vale of Arryn\",\n  \"country\" : \"Westeros\"\n}\n\n# sections can omit the colon, equal before bracket \nseenwith {\n  # nested section\n  # can be spaces or tabs for nesting\n  jaime : {\n    season = season1\n    episode = \"episode1\"\n  }\n\n  cersei = {\n    season = season1\n    episode = \"episode1\"\n  }\n\n}\n\n\n# Line breaks are OK when inside arrays\nseasons = [\n  \"season1\",\n  \"season2\",\n  \"season3\",\n  \"season4\",\n  \"???\"\n]\n\n\n# long strings can use parens to allow multi-line\ndescription (\n    we possibly\n    can have\n    multi line text with a block paren\n    block ends with end paren on new line\n)\n\n\n\n```\n\nAnd the corresponding Go types are:\n\n```go\ntype Config struct {\n\tTitle       string\n\tHand        HandOfKing\n\tLocation    *Address `confl:\"address\"`\n\tSeenwith    map[string]Character\n\tSeasons     []string\n\tDescription string\n}\n\ntype HandOfKing struct {\n\tName     string\n\tOrg      string `json:\"organization\"`  // Reads either confl, or json attributes\n\tBio      string\n\tDOB      time.Time\n\tDeceased bool\n}\n\ntype Address struct {\n\tStreet  string\n\tCity    string\n\tRegion  string\n\tZipCode int\n}\n\ntype Character struct {\n\tEpisode string\n\tSeason  string\n}\n```\n\nNote that a case insensitive match will be tried if an exact match can't be\nfound.\n\nA working example of the above can be found in `_examples/example.{go,conf}`.\n\n\n\n### Examples\n\nThis package works similarly to how the Go standard library handles `XML`\nand `JSON`. Namely, data is loaded into Go values via reflection.\n\nFor the simplest example, consider a file as just a list of keys\nand values:\n\n```\n// Comments in Config\nAge = 25\n# another comment\nCats = [ \"Cauchy\", \"Plato\" ]\n# now, using quotes on key\n\"Pi\" = 3.14\nPerfection = [ 6, 28, 496, 8128 ]\nDOB = 1987-07-05T05:45:00Z\n```\n\nWhich could be defined in Go as:\n\n```go\ntype Config struct {\n  Age int\n  Cats []string\n  Pi float64\n  Perfection []int\n  DOB time.Time \n}\n```\n\nAnd then decoded with:\n\n```go\nvar conf Config\nif err := confl.Unmarshal(byteData, \u0026conf); err != nil {\n  // handle error\n}\n```\n\nYou can also use struct tags if your struct field name doesn't map to a confl\nkey value directly:\n\n```\nsome_key_NAME = \"wat\"\n```\n\n```go\ntype Config struct {\n  ObscureKey string `confl:\"some_key_NAME\"`\n}\n```\n\n### Using the `encoding.TextUnmarshaler` interface\n\nHere's an example that automatically parses duration strings into \n`time.Duration` values:\n\n```\nsong [\n\t{\n\t\tname = \"Thunder Road\"\n\t\tduration = \"4m49s\"\n\t},\n\t{\n\t\tname = \"Stairway to Heaven\"\n\t\tduration = \"8m03s\"\n\t}\n]\n```\n\nWhich can be decoded with:\n\n```go\ntype song struct {\n  Name     string\n  Duration duration\n}\ntype songs struct {\n  Song []song\n}\nvar favorites songs\nif err := confl.Unmarshal(blob, \u0026favorites); err != nil {\n  log.Fatal(err)\n}\n\nfor _, s := range favorites.Song {\n  fmt.Printf(\"%s (%s)\\n\", s.Name, s.Duration)\n}\n```\n\nAnd you'll also need a `duration` type that satisfies the \n`encoding.TextUnmarshaler` interface:\n\n```go\ntype duration struct {\n\ttime.Duration\n}\n\nfunc (d *duration) UnmarshalText(text []byte) error {\n\tvar err error\n\td.Duration, err = time.ParseDuration(string(text))\n\treturn err\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flytics%2Fconfl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flytics%2Fconfl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flytics%2Fconfl/lists"}