File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -2596,7 +2596,12 @@ func isUnixAddrResolvable(fl FieldLevel) bool {
25962596
25972597// isUnixDomainSocketExists is the validation function for validating if the field's value is an existing Unix domain socket.
25982598// It handles both filesystem-based sockets and Linux abstract sockets.
2599+ // It always returns false for Windows.
25992600func isUnixDomainSocketExists (fl FieldLevel ) bool {
2601+ if runtime .GOOS == "windows" {
2602+ return false
2603+ }
2604+
26002605 sockpath := fl .Field ().String ()
26012606
26022607 if sockpath == "" {
Original file line number Diff line number Diff line change @@ -2954,6 +2954,10 @@ func TestUnixAddrValidation(t *testing.T) {
29542954}
29552955
29562956func TestUnixDomainSocketExistsValidation (t * testing.T ) {
2957+ if runtime .GOOS == "windows" {
2958+ t .Skip ("Unix domain sockets are not supported on Windows" )
2959+ }
2960+
29572961 validate := New ()
29582962
29592963 errs := validate .Var ("" , "uds_exists" )
You can’t perform that action at this time.
0 commit comments