You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
205 B

  1. package server
  2. import (
  3. "github.com/pkg/errors"
  4. "gopkg.in/go-playground/validator.v9"
  5. )
  6. var v = validator.New()
  7. func validate(req interface{}) error {
  8. return errors.Wrap(v.Struct(req), "Validate")
  9. }