Switch to mirrorred images for Drone and Docker, make linters happy.
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2022-06-29 15:32:54 +05:00
parent 389c15f1f7
commit d26b8f4262
6 changed files with 44 additions and 42 deletions

View File

@@ -23,12 +23,10 @@
package main
import (
"strings"
// stdlib
"errors"
"log"
"strings"
// other
"go.dev.pztrn.name/valiwork"
)
@@ -40,7 +38,7 @@ func main() {
log.Println("Starting validation example...")
log.Println("WARN: to see additional valiwork output define 'VALIWORK_DEBUG' environment variable and set it to 'true'!")
//stringToValidate := " I am pretty b@d $tring"
// stringToValidate := " I am pretty b@d $tring"
_ = valiwork.RegisterValidator(stringValidatorName, stringValidator)
}
@@ -51,6 +49,7 @@ func stringValidator(thing interface{}, optional ...interface{}) []interface{} {
stringToValidate, ok := thing.(string)
if !ok {
errs = append(errs, errors.New("passed value is not a string"))
return errs
}