ソースを参照

chore: save validation

master
Blaz Smehov 1週間前
コミット
e9f89692df
4個のファイルの変更2行の追加2行の削除
  1. バイナリ
      bridge
  2. +2
    -2
      internal/pkg/validation/validation.go
  3. バイナリ
      location
  4. バイナリ
      server

バイナリ
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


バイナリ
location ファイルの表示


バイナリ
server ファイルの表示


読み込み中…
キャンセル
保存