superlint/.automation/test/go/golang_good_02.go
Brett Logan 917bcbc117 Remove unused parameter
Signed-off-by: Brett Logan <lindluni@github.com>
2023-04-10 19:33:27 -04:00

31 lines
452 B
Go

package main
import (
"github.com/go-playground/validator/v10"
"github.com/labstack/echo/v4"
)
type FooType struct {
Var *string `validate:"alphanum"`
}
func post(echo.Context) (err error) {
validate := validator.New()
if err = validate.Struct(FooType{Var: nil}); err != nil {
return
}
return
}
func server() (e *echo.Echo) {
e = echo.New()
e.POST("/", post)
return
}
func main() {
e := server()
e.Logger.Fatal(e.Start(":8000"))
}