Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
ehhong committed Mar 7, 2023
1 parent ef8ece1 commit 518f2f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ type Config struct {
PackagePath string `json:"-"`
}

// validNameRegex is the pattern that matches to a valid name.
// ValidNameRegex is the pattern that matches to a valid name.
// The name must begin with a letter i.e. [a-zA-Z],
// and the body can only contain 0 or more numbers, letters, dashes and underscores i.e. [-\w]*.
var ValidNameRegex = regexp.MustCompile(`^[a-zA-Z][-\w]*$`)
Expand Down Expand Up @@ -290,7 +290,8 @@ func (config *Remote) Validate(path string) error {
return utils.NewConfigValidationFieldRequiredError(path, "name")
}
if !ValidNameRegex.MatchString(config.Name) {
return utils.NewConfigValidationError(path, errors.Errorf("Remote name %q must only contain letters, numbers, dashes, and underscores", config.Name))
return utils.NewConfigValidationError(path,
errors.Errorf("Remote name %q must only contain letters, numbers, dashes, and underscores", config.Name))
}
if config.Address == "" {
return utils.NewConfigValidationFieldRequiredError(path, "address")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ require (
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/pion/mediadevices v0.4.0
github.com/pion/rtp v1.7.13
github.com/pixiv/go-libjpeg v0.0.0-20190822045933-3da21a74767d
github.com/pion/webrtc/v3 v3.1.54
github.com/pixiv/go-libjpeg v0.0.0-20190822045933-3da21a74767d
github.com/pseudomuto/protoc-gen-doc v1.5.1
github.com/rhysd/actionlint v1.6.22-0.20221022051330-a6edfdd585fc
github.com/rs/cors v1.8.3
Expand Down

0 comments on commit 518f2f9

Please sign in to comment.