aboutsummaryrefslogtreecommitdiff
path: root/cmd/resolver/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/resolver/main.go')
-rw-r--r--cmd/resolver/main.go39
1 files changed, 1 insertions, 38 deletions
diff --git a/cmd/resolver/main.go b/cmd/resolver/main.go
index 9ffc60b..c4b9367 100644
--- a/cmd/resolver/main.go
+++ b/cmd/resolver/main.go
@@ -66,44 +66,7 @@ func main() {
switch rsol.cmd {
case cmdBlockd:
- args = args[1:]
- if len(args) == 0 {
- log.Fatalf("resolver: %s: missing sub command", cmdBlockd)
- }
-
- subCmd = strings.ToLower(args[0])
-
- switch subCmd {
- case subCmdDisable:
- args = args[1:]
- if len(args) == 0 {
- log.Fatalf("resolver: %s %s: missing argument", rsol.cmd, subCmd)
- }
- err = rsol.blockdDisable(args[0])
- if err != nil {
- log.Fatalf("resolver: %s %s: %s", rsol.cmd, subCmd, err)
- }
-
- case subCmdEnable:
- args = args[1:]
- if len(args) == 0 {
- log.Fatalf("resolver: %s %s: missing argument", rsol.cmd, subCmd)
- }
- err = rsol.blockdEnable(args[0])
- if err != nil {
- log.Fatalf("resolver: %s %s: %s", rsol.cmd, subCmd, err)
- }
-
- case subCmdUpdate:
- args = args[1:]
- if len(args) == 0 {
- log.Fatalf("resolver: %s %s: missing argument", rsol.cmd, subCmd)
- }
- err = rsol.blockdUpdate(args[0])
- if err != nil {
- log.Fatalf("resolver: %s %s: %s", rsol.cmd, subCmd, err)
- }
- }
+ rsol.doCmdBlockd(args[1:])
case cmdCaches:
args = args[1:]