Found by golangci-lint's gofmt linter
"host1.example.org",
},
Files: map[string]*safcm.File{
"host1.example.org",
},
Files: map[string]*safcm.File{
- "/": &safcm.File{Path: "/",
OrigGroup: "group",
Mode: fs.ModeDir | 0755 | fs.ModeSetgid,
Uid: -1,
OrigGroup: "group",
Mode: fs.ModeDir | 0755 | fs.ModeSetgid,
Uid: -1,
OrigGroup: "group",
Path: "/etc",
Mode: fs.ModeDir | 0755,
Uid: -1,
Gid: -1,
},
OrigGroup: "group",
Path: "/etc",
Mode: fs.ModeDir | 0755,
Uid: -1,
Gid: -1,
},
- "/etc/.hidden": &safcm.File{
OrigGroup: "group",
Path: "/etc/.hidden",
Mode: 0100 | fs.ModeSetuid | fs.ModeSetgid | fs.ModeSticky,
OrigGroup: "group",
Path: "/etc/.hidden",
Mode: 0100 | fs.ModeSetuid | fs.ModeSetgid | fs.ModeSticky,
Gid: -1,
Data: []byte("..."),
},
Gid: -1,
Data: []byte("..."),
},
- "/etc/motd": &safcm.File{
OrigGroup: "group",
Path: "/etc/motd",
Mode: 0644,
OrigGroup: "group",
Path: "/etc/motd",
Mode: 0644,
Gid: -1,
Data: []byte("Welcome to Host ONE\n\n\n\n\n\nall\n\n\nhost1.example.org\n\n\n\n"),
},
Gid: -1,
Data: []byte("Welcome to Host ONE\n\n\n\n\n\nall\n\n\nhost1.example.org\n\n\n\n"),
},
- "/etc/rc.local": &safcm.File{
OrigGroup: "group",
Path: "/etc/rc.local",
Mode: 0700,
OrigGroup: "group",
Path: "/etc/rc.local",
Mode: 0700,
- "/etc/resolv.conf": &safcm.File{
OrigGroup: "group",
Path: "/etc/resolv.conf",
Mode: 0641,
OrigGroup: "group",
Path: "/etc/resolv.conf",
Mode: 0641,
"echo resolv.conf updated",
},
},
"echo resolv.conf updated",
},
},
- "/etc/test": &safcm.File{
OrigGroup: "group",
Path: "/etc/test",
Mode: os.ModeSymlink | 0777,
OrigGroup: "group",
Path: "/etc/test",
Mode: os.ModeSymlink | 0777,
Path: "file",
Mode: 0640,
Data: []byte("line\n"),
Path: "file",
Mode: 0640,
Data: []byte("line\n"),
Path: "file",
Mode: 0641,
Data: []byte("line\n"),
Path: "file",
Mode: 0641,
Data: []byte("line\n"),
Path: "file",
Mode: 0641,
Data: []byte("existing\nline\n"),
Path: "file",
Mode: 0641,
Data: []byte("existing\nline\n"),
Path: "file",
Mode: 0641,
Data: []byte("existing\nline\n"),
Path: "file",
Mode: 0641,
Data: []byte("existing\nline\n"),
Path: "file",
Mode: 0641,
Data: []byte("first\nline\n"),
Path: "file",
Mode: 0641,
Data: []byte("first\nline\n"),
Path: "file",
Mode: 0641,
Data: []byte("first\nline\n"),
Path: "file",
Mode: 0641,
Data: []byte("first\nline\n"),
Path: "file",
Mode: 0641,
Data: []byte("# line with spaces\nline with spaces\n"),
Path: "file",
Mode: 0641,
Data: []byte("# line with spaces\nline with spaces\n"),
Path: "file",
Mode: fs.ModeSymlink | 0777,
Data: []byte("target"),
Path: "file",
Mode: fs.ModeSymlink | 0777,
Data: []byte("target"),
Path: "file",
Mode: fs.ModeNamedPipe | 0640,
},
Path: "file",
Mode: fs.ModeNamedPipe | 0640,
},
},
[][]byte{nil},
[]error{nil},
},
[][]byte{nil},
[]error{nil},
Path: "/usr/bin/dpkg-query",
Args: []string{
"/usr/bin/dpkg-query",
Path: "/usr/bin/dpkg-query",
Args: []string{
"/usr/bin/dpkg-query",
},
[][]byte{nil, nil},
[]error{nil, nil},
},
[][]byte{nil, nil},
[]error{nil, nil},
Path: "/usr/bin/dpkg-query",
Args: []string{
"/usr/bin/dpkg-query",
Path: "/usr/bin/dpkg-query",
Args: []string{
"/usr/bin/dpkg-query",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
Path: "/usr/bin/apt-get",
Args: []string{
"/usr/bin/apt-get",
Path: "/usr/bin/apt-get",
Args: []string{
"/usr/bin/apt-get",
nil,
fmt.Errorf("fake error"),
},
nil,
fmt.Errorf("fake error"),
},
Path: "/usr/bin/dpkg-query",
Args: []string{
"/usr/bin/dpkg-query",
Path: "/usr/bin/dpkg-query",
Args: []string{
"/usr/bin/dpkg-query",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
Path: "/usr/bin/apt-get",
Args: []string{
"/usr/bin/apt-get",
Path: "/usr/bin/apt-get",
Args: []string{
"/usr/bin/apt-get",
},
[][]byte{nil},
[]error{nil},
},
[][]byte{nil},
[]error{nil},
Path: "/usr/bin/dpkg-query",
Args: []string{
"/usr/bin/dpkg-query",
Path: "/usr/bin/dpkg-query",
Args: []string{
"/usr/bin/dpkg-query",
},
[][]byte{nil},
[]error{nil},
},
[][]byte{nil},
[]error{nil},
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
[][]byte{nil},
[]error{nil},
},
[][]byte{nil},
[]error{nil},
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
[][]byte{nil},
[]error{nil},
},
[][]byte{nil},
[]error{nil},
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
[]byte("fake stderr"),
},
[]error{nil, nil, nil, nil},
[]byte("fake stderr"),
},
[]error{nil, nil, nil, nil},
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
[][]byte{nil},
[]error{nil},
},
[][]byte{nil},
[]error{nil},
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
nil,
fmt.Errorf("fake error"),
},
nil,
fmt.Errorf("fake error"),
},
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
},
Stdout: &bytes.Buffer{},
Stderr: &bytes.Buffer{},
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",
Path: "/bin/systemctl",
Args: []string{
"/bin/systemctl",