From 3ced77412e1e58fea63a4adde7e646b41e2e832d Mon Sep 17 00:00:00 2001 From: Torin Sandall Date: Thu, 22 Jun 2017 10:49:52 +0800 Subject: [PATCH] Remove dead code from run command The --policy-dir option was removed a while ago. Forgot to remove the relevant helpers in the run command. --- cmd/run.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/cmd/run.go b/cmd/run.go index 0ae050f4c5..e5bc2c1010 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -9,7 +9,6 @@ import ( "fmt" "os" "path" - "path/filepath" "github.com/open-policy-agent/opa/runtime" "github.com/open-policy-agent/opa/server" @@ -20,9 +19,6 @@ import ( // default filename for the interactive shell's history var defaultHistoryFile = ".opa_history" -// default policy definition storage directory -var defaultPolicyDir = "policies" - // default listening address for the server var defaultAddr = ":8181" @@ -158,14 +154,6 @@ func historyPath() string { return path.Join(home, defaultHistoryFile) } -func policyDir() string { - cwd, err := os.Getwd() - if err != nil { - return defaultPolicyDir - } - return filepath.Join(cwd, defaultPolicyDir) -} - func loadCertificate(tlsCertFile, tlsPrivateKeyFile string) (*tls.Certificate, error) { if tlsCertFile != "" && tlsPrivateKeyFile != "" {