Skip to content

Commit 279fdf9

Browse files
committed
docs: replace main() with init() in rlimit example
This is probably how it should be used in production, and staticcheck started complaining about main() being unused. Signed-off-by: Timo Beckers <[email protected]>
1 parent d41cdc2 commit 279fdf9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/examples/rlimit_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package examples
55
// DocRlimit {
66
import "github.com/cilium/ebpf/rlimit"
77

8-
func main() {
8+
func init() {
99
if err := rlimit.RemoveMemlock(); err != nil {
1010
panic(err)
1111
}

0 commit comments

Comments
 (0)