Skip to content

Vector-Hector/fptf

Repository files navigation

fptf

Go bindings of fptf.

This package is just a collection of types and (un)marshall functions, really. But since fptf requires some optional stuff (e.g. stops can be objects or strings), you'd kind of have to add a lot of functions to your types.
This package takes care of that.

Usage

Import the stuff:

package main

import (
	"encoding/json"
	"github.com/Vector-Hector/fptf"
)

func main() {
	// ...find some data called dat

	var journey fptf.Journey
	err := json.Unmarshal(dat, &journey)
	if err != nil {
		panic(err)
	}
}

All the types specified in the specs can be accessed through this package.
Just capitalize the first letter and write fptf. in front of it ^^