wip: refactory
This commit is contained in:
@ -9,7 +9,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/jedib0t/go-pretty/v6/table"
|
||||
"github.com/loveuer/nf/nft/log"
|
||||
"github.com/loveuer/esgo2dump/pkg/log"
|
||||
)
|
||||
|
||||
func TablePrinter(data any, writers ...io.Writer) {
|
||||
|
15
internal/tool/validate.go
Normal file
15
internal/tool/validate.go
Normal file
@ -0,0 +1,15 @@
|
||||
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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user