@@ -26,7 +26,7 @@ func isValidCredsMessage(msg string) error {
2626
2727// Store uses an external program to save credentials.
2828func Store (program ProgramFunc , creds * credentials.Credentials ) error {
29- cmd := program ("store" )
29+ cmd := program (credentials . ActionStore )
3030
3131 buffer := new (bytes.Buffer )
3232 if err := json .NewEncoder (buffer ).Encode (creds ); err != nil {
@@ -50,7 +50,7 @@ func Store(program ProgramFunc, creds *credentials.Credentials) error {
5050
5151// Get executes an external program to get the credentials from a native store.
5252func Get (program ProgramFunc , serverURL string ) (* credentials.Credentials , error ) {
53- cmd := program ("get" )
53+ cmd := program (credentials . ActionGet )
5454 cmd .Input (strings .NewReader (serverURL ))
5555
5656 out , err := cmd .Output ()
@@ -81,7 +81,7 @@ func Get(program ProgramFunc, serverURL string) (*credentials.Credentials, error
8181
8282// Erase executes a program to remove the server credentials from the native store.
8383func Erase (program ProgramFunc , serverURL string ) error {
84- cmd := program ("erase" )
84+ cmd := program (credentials . ActionErase )
8585 cmd .Input (strings .NewReader (serverURL ))
8686 out , err := cmd .Output ()
8787 if err != nil {
@@ -99,7 +99,7 @@ func Erase(program ProgramFunc, serverURL string) error {
9999
100100// List executes a program to list server credentials in the native store.
101101func List (program ProgramFunc ) (map [string ]string , error ) {
102- cmd := program ("list" )
102+ cmd := program (credentials . ActionList )
103103 cmd .Input (strings .NewReader ("unused" ))
104104 out , err := cmd .Output ()
105105 if err != nil {
0 commit comments