vdf

package module
v0.0.0-...-0be6ec1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 2 Imported by: 3

README

VDF

Go Version 1.16 Status Shield Test Status

Golang Binary Valve Data Format implementation

Install

go get -u github.com/wakeful-cloud/vdf

Features

  • Binary VDF support
  • Fully unit tested
  • No dependencies

Limitations

  • No support for non-binary VDF's
  • Order of key-value's are not preserved (Steam doesn't care though)

Docs

  • vdf.Map: structure use to represent a parsed/read VDF

    • Signature: map[string]interface{}
  • vdf.ReadVdf: function that reads bytes to a vdf.Map

    • Signature: ReadVdf([]byte): (vdf.Map, error)
  • vdf.WriteVdf: function that writes a vdf.Map to bytes

    • Signature: WriteVdf(vdf.Map): ([]byte, error)

Example

See example/main.go

Credit

Heavily based on Corecii's Steam Binary VSF TS Package.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteVdf

func WriteVdf(vdfMap Map) ([]byte, error)

WriteVdf writes a binary VDF file

Types

type Map

type Map map[string]interface{}

Map represents a VDF file map

func ReadVdf

func ReadVdf(data []byte) (Map, error)

ReadVdf reads a binary VDF file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL