https://github.com/zxdev/unit
simple unit file parser
https://github.com/zxdev/unit
Last synced: 6 months ago
JSON representation
simple unit file parser
- Host: GitHub
- URL: https://github.com/zxdev/unit
- Owner: zxdev
- License: mit
- Created: 2023-04-16T15:42:17.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-01-12T03:37:16.000Z (over 2 years ago)
- Last Synced: 2024-01-12T15:47:37.934Z (over 2 years ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# unit
reads and builds a ```map[string]string``` from a simple unit style resource file
./sample
```
[sample]
key1 = value1
key2 = value2
[sample2]
# comments are supported as are colon seperators and
# multi-segemented values are not disturbed on parse
key1 : value1
key2 : value2,value3,value4
key3 : value3:value4:value5
key4 : value4=value5
```
```golang
var u unit.Unit
u.Parse("./sample", "sample")
// u = map{key1:value1, key2:value2}
fmt.Println(u)
```