Registry / config / go-git-gcfg

go-git-gcfg

JSON →
library1.5.0gogounverified

Package gcfg reads INI-style text-based configuration files with name=value pairs grouped into sections, similar to git config syntax.

go get github.com/go-git/gcfg
INSTALL
IMPORT
SIG · GO-GIT-GCFG
G
go-git-gcfg
configgov1.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gcfg
github.com/go-git/gcfg

Reads a simple INI-style configuration string into a struct.

package main import ( "fmt" "github.com/go-git/gcfg" ) type Config struct { Section struct { Key string } } func main() { var cfg Config err := gcfg.ReadStringInto(&cfg, "[section]\nkey = value\n") if err != nil { panic(err) } fmt.Println(cfg.Section.Key) }
Debug
Known issues
gotchaPackage panics on programmer errors like non-pointer or unsuitable struct fields.
fix
Ensure the config argument is a pointer to a struct with exported fields of appropriate types.
affects: all
Upgrade
Version history
1.5.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
26
Resources
go-git-gcfg — go get go-git-gcfg · libregistry