mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-27 10:45:08 -06:00
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:
-12
@@ -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 != "" {
|
||||
|
||||
Reference in New Issue
Block a user