Skip to content

Commit

Permalink
fix: redundant name check
Browse files Browse the repository at this point in the history
  • Loading branch information
shiroyk committed Nov 30, 2024
1 parent 3ad9d62 commit 2949197
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ var reName = regexp.MustCompile(`^[a-zA-Z0-9_]+$`)
// Register registers the NewExecutor with the given name.
// Valid name characters: a-zA-Z0-9_
func Register(name string, fn NewExecutor) {
if name == "" {
panic("ski: invalid pattern")
}
if fn == nil {
panic("ski: NewExecutor is nil")
}
Expand Down Expand Up @@ -88,9 +85,6 @@ func Registers(e NewExecutors) {
defer executors.Unlock()

for name, fn := range e {
if name == "" {
panic("ski: invalid pattern")
}
if fn == nil {
panic("ski: NewExecutor is nil")
}
Expand Down

0 comments on commit 2949197

Please sign in to comment.