Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
KimMachineGun committed Dec 14, 2023
1 parent de63d4a commit a7988fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ go get github.com/KimMachineGun/automemlimit@latest
package main

// By default, it sets `GOMEMLIMIT` to 90% of cgroup's memory limit.
// You can find more details of its behavior from the doc comment of memlimit.SetGoMemLimitWithEnv.
// This is equivalent to `memlimit.SetGoMemLimitWithOpts(memlimit.WithEnv(), memlimit.WithLogger(slog.Default()))``
import _ "github.com/KimMachineGun/automemlimit"
```

Expand All @@ -36,6 +36,7 @@ func init() {
memlimit.WithRatio(0.9),
memlimit.WithEnv(),
memlimit.WithProvider(memlimit.FromCgroup),
memlimit.WithLogger(slog.Default()),
)
memlimit.SetGoMemLimitWithEnv()
memlimit.SetGoMemLimit(0.9)
Expand Down

0 comments on commit a7988fc

Please sign in to comment.