Skip to content

Latest commit

 

History

History
38 lines (25 loc) · 971 Bytes

README.md

File metadata and controls

38 lines (25 loc) · 971 Bytes

godat - Simple data serializer for Go 1.7+

Build Status codecov License

Install

go get github.com/lokhman/godat

Usage

import "github.com/lokhman/godat"

func main() {
    var anyData = ...
    var unserializedData ...

    serializedBytes, err := godat.Marshal(anyData)
    if err != nil {
        panic(err)
    }
    
    err = godat.Unmarshal(serializedBytes, &unserializedData)
    if err != nil {
        panic(err)
    }
    
    // anyData == unserializedData
}

Tests

Use go test for testing.

License

Library is available under the MIT license. The included LICENSE file describes this in detail.