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.
This commit is contained in:
Torin Sandall
2017-06-22 10:49:52 +08:00
parent 98d5da7826
commit 3ced77412e
-12
View File
@@ -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 != "" {