Use go generate
to generate an API for the OpenAir XML API.
Note: This project requires Go 1.8 or later to build.
go get -u github.com/joefitzgerald/openair
- Create
definition.go
in a package that you wish to have generated files in, with the following content:
package openair
//go:generate openair -prefix=openair_ -suffix= -object=Customer,Project,User,Timetype,Timesheet,TaskTimecard,Task
- Run
go generate .
in the package that containsdefinition.go
- Observe new files generated:
openair_common.go
openair_customer.go
openair_project.go
openair_task.go
openair_tasktimecard.go
openair_timesheet.go
openair_timetype.go
openair_user.go
Apache 2.0