https://github.com/mdouchement/vdf
Valve Data Format parser and generator written in Golang
https://github.com/mdouchement/vdf
generator parser steam valve valve-data-format vdf-format
Last synced: over 1 year ago
JSON representation
Valve Data Format parser and generator written in Golang
- Host: GitHub
- URL: https://github.com/mdouchement/vdf
- Owner: mdouchement
- License: mit
- Created: 2018-06-01T12:29:36.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-01T13:35:04.000Z (about 8 years ago)
- Last Synced: 2025-01-07T06:50:10.253Z (over 1 year ago)
- Topics: generator, parser, steam, valve, valve-data-format, vdf-format
- Language: Go
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Valve Data Format
[](https://circleci.com/gh/mdouchement/vdf)
[](https://godoc.org/github.com/mdouchement/vdf)
[](https://goreportcard.com/report/github.com/mdouchement/vdf)
[](http://opensource.org/licenses/MIT)
A parser and a generator for [Valve Data Format](https://developer.valvesoftware.com/wiki/KeyValues) written in Go. It does not support all the features provided in Valve Data Format spec.
Supported files (at least):
- remotecache.vdf
## Usage
```go
package main
import (
"io/ioutil"
"github.com/mdouchement/vdf"
"github.com/sanity-io/litter"
)
func main() {
data, err := ioutil.ReadFile("remotecache.vdf")
check(err)
root, err := vdf.Parse(string(data))
check(err)
litter.Dump(root)
}
func check(err error) {
if err != nil {
panic(err)
}
}
```
## License
**MIT**
## Contributing
All PRs are welcome.
1. Fork it
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
5. Push to the branch (git push origin my-new-feature)
6. Create new Pull Request
As possible, run the following commands to format and lint the code:
```sh
# Format
find . -name '*.go' -not -path './vendor*' -exec gofmt -s -w {} \;
# Lint
gometalinter --config=gometalinter.json ./...
```