Skip to content

Commit 242fb7c

Browse files
authored
Merge pull request #73 from cpdevws/patch-2
Fixing the example to use the correct API as per latest changes
2 parents 85305f4 + 20e2543 commit 242fb7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

authorization/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ This library is designed to be integrated in your program.
2323
```go
2424
p := MyAuthZPlugin{}
2525
h := authorization.NewHandler(p)
26-
h.ServeUnix("root", "test_plugin")
26+
u, _ := user.Lookup("root")
27+
gid, _ := strconv.Atoi(u.Gid)
28+
h.ServeUnix("test_plugin", gid)
2729
```
2830

2931
## Full example plugins

0 commit comments

Comments
 (0)