This library aims to provides basic NeTEx bindings for golang that are more readable and intuitive to use than auto-generated ones.
It is intended to be used with the golang encoding/xml library both for marshalling and unmarshalling
It is currently a partial implementation, based on the Italian profile, developed alongside our Transmodel API, and only covers it's use cases.
That being said, we warmly welcome contributions to bring this towards complete NeTEx coverage.
If you need any fields/structs that are not implemented yet, please open an Issue or a PR and we'll do our best to add it
go get github.com/noi-techpark/go-netex
Use the provided structs with xml.Marshal and xml.Unmarshal
The root element is netex.PublicationDelivery
delivery := netex.PublicationDelivery{}
// ... populate
err = xml.Marshal(data, &delivery)
bytes, err := xml.Marshal(fleet) data, err := os.ReadFile("netex.xml")
var delivery netex.PublicationDelivery
err = xml.Unmarshal(data, &delivery)NeTEx uses ISO 8601 as timestamp format, which means lots of missing location information that needs special handling.
We just give you the raw strings, you can use time.Time.String() to populate as it's valid ISO 8601
For support, please contact [email protected].
If you'd like to contribute, please follow our Getting Started instructions.
The code in this project is licensed under Mozilla Public License Version 2.0
This project is REUSE compliant, more information about the usage of REUSE in NOI Techpark repositories can be found here.
Since the CI for this project checks for REUSE compliance you might find it useful to use a pre-commit hook checking for REUSE compliance locally. The pre-commit-config file in the repository root is already configured to check for REUSE compliance with help of the pre-commit tool.
Install the tool by running:
pip install pre-commitThen install the pre-commit hook via the config file by running:
pre-commit install