소스 검색

chore: save validation

master
Blaz Smehov 1 주 전
부모
커밋
e9f89692df
4개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. BIN
      bridge
  2. +2
    -2
      internal/pkg/validation/validation.go
  3. BIN
      location
  4. BIN
      server

BIN
bridge 파일 보기


+ 2
- 2
internal/pkg/validation/validation.go 파일 보기

@@ -10,7 +10,7 @@ import (
var defaultValidator = validator.New()

// Struct validates s and returns the first validation error as a readable message, or nil.
func Struct(s interface{}) error {
func Struct(s any) error {
err := defaultValidator.Struct(s)
if err == nil {
return nil
@@ -23,7 +23,7 @@ func Struct(s interface{}) error {
}

// Var validates a single value with the given tag (e.g. "required") and returns an error or nil.
func Var(field interface{}, tag string) error {
func Var(field any, tag string) error {
err := defaultValidator.Var(field, tag)
if err == nil {
return nil


BIN
location 파일 보기


BIN
server 파일 보기


불러오는 중...
취소
저장