diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/finger/main.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/finger/main.go b/examples/finger/main.go new file mode 100644 index 0000000..3000dd7 --- /dev/null +++ b/examples/finger/main.go @@ -0,0 +1,27 @@ +package main + +import ( + "context" + "log" + + "tildegit.org/tjp/gus/finger" + "tildegit.org/tjp/gus/logging" +) + +func main() { + _, infoLog, _, errLog := logging.DefaultLoggers() + + fs, err := finger.NewServer( + context.Background(), + "localhost", + "tcp", + ":79", + logging.LogRequests(infoLog)(finger.SystemFinger(false)), + errLog, + ) + if err != nil { + log.Fatal(err) + } + + fs.Serve() +} |