diff options
author | Ian Gudger <igudger@google.com> | 2018-09-21 14:05:46 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-09-21 14:06:59 -0700 |
commit | 7ce13ebcadc764c5f69215f072b53d3843bec679 (patch) | |
tree | 4968b723919164eb8789653ab7f5ce8ec0bb56a9 /pkg | |
parent | 4634cd66ad036023c218dd6c3899194039cc608b (diff) |
Run gofmt -s on everything
PiperOrigin-RevId: 214040901
Change-Id: I74d79497a053da3624921ad2b7c5193ca4a87942
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/seccomp/seccomp.go | 2 | ||||
-rw-r--r-- | pkg/seccomp/seccomp_rules.go | 2 | ||||
-rw-r--r-- | pkg/seccomp/seccomp_test.go | 10 |
3 files changed, 7 insertions, 7 deletions
diff --git a/pkg/seccomp/seccomp.go b/pkg/seccomp/seccomp.go index cd6b0b4bc..49da3c775 100644 --- a/pkg/seccomp/seccomp.go +++ b/pkg/seccomp/seccomp.go @@ -98,7 +98,7 @@ func buildProgram(rules SyscallRules, kill bool) ([]linux.BPFInstruction, error) // buildIndex builds a BST to quickly search through all syscalls that are whitelisted. func buildIndex(rules SyscallRules, program *bpf.ProgramBuilder) error { syscalls := []uintptr{} - for sysno, _ := range rules { + for sysno := range rules { syscalls = append(syscalls, sysno) } diff --git a/pkg/seccomp/seccomp_rules.go b/pkg/seccomp/seccomp_rules.go index 4b99792fd..9215e5c90 100644 --- a/pkg/seccomp/seccomp_rules.go +++ b/pkg/seccomp/seccomp_rules.go @@ -120,7 +120,7 @@ func (sr SyscallRules) Merge(rules SyscallRules) { sr[sysno] = append(sr[sysno], Rule{}) } if len(rs) == 0 { - rs = []Rule{Rule{}} + rs = []Rule{{}} } sr[sysno] = append(sr[sysno], rs...) } else { diff --git a/pkg/seccomp/seccomp_test.go b/pkg/seccomp/seccomp_test.go index 9f9507228..42cf85c03 100644 --- a/pkg/seccomp/seccomp_test.go +++ b/pkg/seccomp/seccomp_test.go @@ -368,19 +368,19 @@ func TestMerge(t *testing.T) { name: "empty both", main: nil, merge: nil, - want: []Rule{Rule{}, Rule{}}, + want: []Rule{{}, {}}, }, { name: "empty main", main: nil, - merge: []Rule{Rule{}}, - want: []Rule{Rule{}, Rule{}}, + merge: []Rule{{}}, + want: []Rule{{}, {}}, }, { name: "empty merge", - main: []Rule{Rule{}}, + main: []Rule{{}}, merge: nil, - want: []Rule{Rule{}, Rule{}}, + want: []Rule{{}, {}}, }, } { t.Run(tst.name, func(t *testing.T) { |