]> ruderich.org/simon Gitweb - safcm/safcm.git/commitdiff
remote: go fmt
authorSimon Ruderich <simon@ruderich.org>
Tue, 20 Apr 2021 09:44:16 +0000 (11:44 +0200)
committerSimon Ruderich <simon@ruderich.org>
Tue, 20 Apr 2021 09:44:16 +0000 (11:44 +0200)
cmd/safcm-remote/sync/commands_test.go
cmd/safcm/config/commands.go
cmd/safcm/sync_sync_test.go
types.go

index 1c534188eae0439e6c3eda15acd816aa11376e30..9de9bd5bd72ca7e0c41074d8b2b39c3fb0f4000c 100644 (file)
@@ -68,7 +68,7 @@ func TestSyncCommands(t *testing.T) {
                                Commands: []*safcm.Command{
                                        {
                                                OrigGroup: "group",
-                                               Cmd: "echo; env | grep SAFCM_",
+                                               Cmd:       "echo; env | grep SAFCM_",
                                        },
                                },
                        },
@@ -111,7 +111,7 @@ func TestSyncCommands(t *testing.T) {
                                Commands: []*safcm.Command{
                                        {
                                                OrigGroup: "group",
-                                               Cmd: "echo; env | grep SAFCM_",
+                                               Cmd:       "echo; env | grep SAFCM_",
                                        },
                                },
                        },
@@ -143,7 +143,7 @@ func TestSyncCommands(t *testing.T) {
                                Commands: []*safcm.Command{
                                        {
                                                OrigGroup: "group",
-                                               Cmd: "echo hi; false",
+                                               Cmd:       "echo hi; false",
                                        },
                                },
                        },
@@ -187,7 +187,7 @@ func TestSyncCommands(t *testing.T) {
                                Commands: []*safcm.Command{
                                        {
                                                OrigGroup: "group",
-                                               Cmd: "echo hi; false",
+                                               Cmd:       "echo hi; false",
                                        },
                                },
                        },
@@ -219,16 +219,16 @@ func TestSyncCommands(t *testing.T) {
                                Commands: []*safcm.Command{
                                        {
                                                OrigGroup: "group1",
-                                               Cmd: "echo first",
+                                               Cmd:       "echo first",
                                        }, {
                                                OrigGroup: "group2",
-                                               Cmd: "echo second",
+                                               Cmd:       "echo second",
                                        }, {
                                                OrigGroup: "group3",
-                                               Cmd: "false",
+                                               Cmd:       "false",
                                        }, {
                                                OrigGroup: "group4",
-                                               Cmd: "echo third",
+                                               Cmd:       "echo third",
                                        },
                                },
                        },
@@ -342,7 +342,7 @@ func TestSyncCommands(t *testing.T) {
                                Commands: []*safcm.Command{
                                        {
                                                OrigGroup: "group",
-                                               Cmd: "echo; env | grep SAFCM_",
+                                               Cmd:       "echo; env | grep SAFCM_",
                                        },
                                },
                        },
@@ -461,7 +461,7 @@ func TestSyncCommands(t *testing.T) {
                                Commands: []*safcm.Command{
                                        {
                                                OrigGroup: "group",
-                                               Cmd: "echo; env | grep SAFCM_",
+                                               Cmd:       "echo; env | grep SAFCM_",
                                        },
                                },
                        },
index 72a28fd860772b863127b8da12bfac4b4cf21091..569cdbe7dcf8fc93bed2035cc8b7ad71992d46fd 100644 (file)
@@ -47,7 +47,7 @@ func LoadCommands(group string) ([]*safcm.Command, error) {
        for _, x := range cmds {
                res = append(res, &safcm.Command{
                        OrigGroup: group,
-                       Cmd: x,
+                       Cmd:       x,
                })
        }
        return res, nil
index f100f35125e125fa64884086698f4aac78448d3d..e96fe140ae612a6a08f2429388c2d333fced2191 100644 (file)
@@ -139,11 +139,11 @@ func TestHostSyncReq(t *testing.T) {
                                Commands: []*safcm.Command{
                                        {
                                                OrigGroup: "group",
-                                               Cmd: "echo command one",
+                                               Cmd:       "echo command one",
                                        },
                                        {
                                                OrigGroup: "group",
-                                               Cmd: "echo -n command two",
+                                               Cmd:       "echo -n command two",
                                        },
                                },
                        },
@@ -244,11 +244,11 @@ func TestHostSyncReq(t *testing.T) {
                                Commands: []*safcm.Command{
                                        {
                                                OrigGroup: "group",
-                                               Cmd: "echo command one",
+                                               Cmd:       "echo command one",
                                        },
                                        {
                                                OrigGroup: "group",
-                                               Cmd: "echo -n command two",
+                                               Cmd:       "echo -n command two",
                                        },
                                },
                        },
index 37c0d4a21c6c5f26672747edd6f42e7ee8ca7323..cca638ec1c448cfe9c5511879aa93dc7519b7241 100644 (file)
--- a/types.go
+++ b/types.go
@@ -108,7 +108,7 @@ type File struct {
 
 type Command struct {
        OrigGroup string // group which provided this command
-       Cmd string
+       Cmd       string
 }
 
 type FileChange struct {