Skip to content

Latest commit

 

History

History
65 lines (45 loc) · 1.51 KB

README.md

File metadata and controls

65 lines (45 loc) · 1.51 KB

Valve Data Format

CircleCI GoDoc Go Report Card License

A parser and a generator for Valve Data Format written in Go. It does not support all the features provided in Valve Data Format spec.

Supported files (at least):

  • remotecache.vdf

Usage

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')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

As possible, run the following commands to format and lint the code:

# Format
find . -name '*.go' -not -path './vendor*' -exec gofmt -s -w {} \;

# Lint
gometalinter --config=gometalinter.json ./...