package
module
Version:
v0.0.0-...-5230e68
Opens a new window with list of versions in this module.
Published: Sep 16, 2017
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 2
Opens a new window with list of known importers.
README
¶
Struct validator for golang
Another dumb library on the topic
import (
"github.com/Ajnasz/config-validator"
"log"
)
type Config struct {
Foo string `required:"true"`
Bar int `required:"true"`
}
func main() {
config := Config{}
err := configValidator.Validate(config)
if err != nil {
log.Fatal(err)
}
}
Documentation
¶
func Validate(config interface{}) error
Validate Validates the configuration
Source Files
¶
Click to show internal directories.
Click to hide internal directories.