esgo2dump/internal/tool/validate.go

16 lines
219 B
Go
Raw Normal View History

2025-02-05 18:07:53 +08:00
package tool
import (
"fmt"
"strings"
)
func ValidScheme(scheme string) error {
switch strings.ToLower(scheme) {
case "http", "https":
return nil
default:
return fmt.Errorf("invalid scheme: %s", scheme)
}
}