Skip to content

Commit

Permalink
delete: cab validation (#1843)
Browse files Browse the repository at this point in the history
Co-authored-by: wadahiroka <wadahiroka@wadahirokanoMBP.AirPort>
  • Loading branch information
wadda0714 and wadahiroka committed Feb 1, 2024
1 parent ea84385 commit 76267a5
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions config/windows.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package config

import (
"os"

"golang.org/x/xerrors"
)

Expand All @@ -15,11 +13,7 @@ type WindowsConf struct {
// Validate validates configuration
func (c *WindowsConf) Validate() []error {
switch c.ServerSelection {
case 0, 1, 2:
case 3:
if _, err := os.Stat(c.CabPath); err != nil {
return []error{xerrors.Errorf("%s does not exist. err: %w", c.CabPath, err)}
}
case 0, 1, 2, 3:
default:
return []error{xerrors.Errorf("ServerSelection: %d does not support . Reference: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-uamg/07e2bfa4-6795-4189-b007-cc50b476181a", c.ServerSelection)}
}
Expand Down

0 comments on commit 76267a5

Please sign in to comment.