Skip to content

Commit 5b1807a

Browse files
committed
wit: fix switch
1 parent 4bf4de4 commit 5b1807a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

wit/ident.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ func validateName(s string) error {
108108
return errors.New("invalid character " + strconv.Quote(string(c)))
109109
}
110110
case c == '-':
111-
switch {
112-
case prev == 0: // start of string
111+
switch prev {
112+
case 0: // start of string
113113
return errors.New("invalid leading -")
114-
case prev == '-':
114+
case '-':
115115
return errors.New("invalid double --")
116116
}
117117
default:

0 commit comments

Comments
 (0)