Make golangci-lint happy, second try
This commit is contained in:
parent
2b17a3c193
commit
4825c1c2af
@ -149,6 +149,7 @@ func (b *Bmumble) extractFiles(msg *config.Message) []config.Message {
|
||||
}
|
||||
|
||||
func (b *Bmumble) parseChannelPath(client *gumble.Client, name string) ([]string, error) {
|
||||
// Parse the channel name as a numeric ID if passed as "ID:42"
|
||||
if strings.HasPrefix(name, "ID:") {
|
||||
// Parse the ID string into an int
|
||||
channelID, err := strconv.ParseUint(name[3:], 10, 32)
|
||||
@ -163,7 +164,8 @@ func (b *Bmumble) parseChannelPath(client *gumble.Client, name string) ([]string
|
||||
return nil, errors.New("no such channel: " + name)
|
||||
}
|
||||
return gumbleutil.ChannelPath(c)[1:], nil
|
||||
} else {
|
||||
}
|
||||
|
||||
if !strings.HasPrefix(name, "/") {
|
||||
return nil, errors.New("channel path must start with a '/': " + name)
|
||||
}
|
||||
@ -189,4 +191,3 @@ func (b *Bmumble) parseChannelPath(client *gumble.Client, name string) ([]string
|
||||
}
|
||||
return gumbleutil.ChannelPath(c)[1:], nil
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user