mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-21 07:51:28 +02:00
refactor: fix lint errors; improve error handling
This commit is contained in:
@@ -158,13 +158,14 @@ func parse(v string) (subject string, args []string, err error) {
|
||||
buf.WriteRune('$')
|
||||
}
|
||||
|
||||
if quote != 0 {
|
||||
switch {
|
||||
case quote != 0:
|
||||
err = ErrUnterminatedQuotes
|
||||
} else if brackets != 0 {
|
||||
case brackets != 0:
|
||||
err = ErrUnterminatedBrackets
|
||||
} else if inEnvVar {
|
||||
case inEnvVar:
|
||||
err = ErrUnterminatedEnvVar
|
||||
} else {
|
||||
default:
|
||||
flush(false)
|
||||
}
|
||||
if len(missingEnvVars) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user