This is an ongoing W-I-P, as I look at a set of RESTful services that I'm co-developing using Go ( aka GoLang ).
Two things that have been of immense use are: -
Validating Data Structures And Variables In Golang
Regular Expressions 101
the latter of which has been very useful in terms of creating/testing/validating Regular Expressions ( aka RegExp ).
For me, the key thing is to be able to create validation rules within the JSON data structures, and then use the Go-Validator GoLang module/plugin/add-on: -
https://github.com/go-validator/validator
Specifically, I'm using the latest version 9 ( v9 ): -
"gopkg.in/go-playground/validator.v9"
Two things that have been of immense use are: -
Validating Data Structures And Variables In Golang
Regular Expressions 101
the latter of which has been very useful in terms of creating/testing/validating Regular Expressions ( aka RegExp ).
For me, the key thing is to be able to create validation rules within the JSON data structures, and then use the Go-Validator GoLang module/plugin/add-on: -
https://github.com/go-validator/validator
Specifically, I'm using the latest version 9 ( v9 ): -
"gopkg.in/go-playground/validator.v9"
Loving my job :-)