profiles/seccomp: format code with gofumpt
Formatting the code with https://github.com/mvdan/gofumpt Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
4175a550fd
commit
169fab5146
3 changed files with 4 additions and 5 deletions
|
@ -25,7 +25,7 @@ func main() {
|
|||
panic(err)
|
||||
}
|
||||
|
||||
if err := os.WriteFile(f, b, 0644); err != nil {
|
||||
if err := os.WriteFile(f, b, 0o644); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ func getKernelVersion() (*KernelVersion, error) {
|
|||
|
||||
// parseRelease parses a string and creates a KernelVersion based on it.
|
||||
func parseRelease(release string) (*KernelVersion, error) {
|
||||
var version = KernelVersion{}
|
||||
version := KernelVersion{}
|
||||
|
||||
// We're only make sure we get the "kernel" and "major revision". Sometimes we have
|
||||
// 3.12.25-gentoo, but sometimes we just have 3.12-1-amd64.
|
||||
|
|
|
@ -39,7 +39,6 @@ func TestLoadProfile(t *testing.T) {
|
|||
}},
|
||||
},
|
||||
{
|
||||
|
||||
Names: []string{"open"},
|
||||
Action: specs.ActAllow,
|
||||
Args: []specs.LinuxSeccompArg{},
|
||||
|
@ -62,7 +61,7 @@ func TestLoadProfile(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestLoadProfileWithDefaultErrnoRet(t *testing.T) {
|
||||
var profile = []byte(`{
|
||||
profile := []byte(`{
|
||||
"defaultAction": "SCMP_ACT_ERRNO",
|
||||
"defaultErrnoRet": 6
|
||||
}`)
|
||||
|
@ -82,7 +81,7 @@ func TestLoadProfileWithDefaultErrnoRet(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestLoadProfileWithListenerPath(t *testing.T) {
|
||||
var profile = []byte(`{
|
||||
profile := []byte(`{
|
||||
"defaultAction": "SCMP_ACT_ERRNO",
|
||||
"listenerPath": "/var/run/seccompaget.sock",
|
||||
"listenerMetadata": "opaque-metadata"
|
||||
|
|
Loading…
Reference in a new issue