@@ -26,7 +26,7 @@ func isValidCredsMessage(msg string) error {
26
26
27
27
// Store uses an external program to save credentials.
28
28
func Store (program ProgramFunc , creds * credentials.Credentials ) error {
29
- cmd := program ("store" )
29
+ cmd := program (credentials . ActionStore )
30
30
31
31
buffer := new (bytes.Buffer )
32
32
if err := json .NewEncoder (buffer ).Encode (creds ); err != nil {
@@ -50,7 +50,7 @@ func Store(program ProgramFunc, creds *credentials.Credentials) error {
50
50
51
51
// Get executes an external program to get the credentials from a native store.
52
52
func Get (program ProgramFunc , serverURL string ) (* credentials.Credentials , error ) {
53
- cmd := program ("get" )
53
+ cmd := program (credentials . ActionGet )
54
54
cmd .Input (strings .NewReader (serverURL ))
55
55
56
56
out , err := cmd .Output ()
@@ -81,7 +81,7 @@ func Get(program ProgramFunc, serverURL string) (*credentials.Credentials, error
81
81
82
82
// Erase executes a program to remove the server credentials from the native store.
83
83
func Erase (program ProgramFunc , serverURL string ) error {
84
- cmd := program ("erase" )
84
+ cmd := program (credentials . ActionErase )
85
85
cmd .Input (strings .NewReader (serverURL ))
86
86
out , err := cmd .Output ()
87
87
if err != nil {
@@ -99,7 +99,7 @@ func Erase(program ProgramFunc, serverURL string) error {
99
99
100
100
// List executes a program to list server credentials in the native store.
101
101
func List (program ProgramFunc ) (map [string ]string , error ) {
102
- cmd := program ("list" )
102
+ cmd := program (credentials . ActionList )
103
103
cmd .Input (strings .NewReader ("unused" ))
104
104
out , err := cmd .Output ()
105
105
if err != nil {
0 commit comments