From 4f6f3dcd4b8c71f5caa52864092dbde22665a645 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Mon, 30 Jan 2023 11:34:13 -0700 Subject: finger protocol --- examples/finger/main.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 examples/finger/main.go (limited to 'examples/finger/main.go') 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() +} -- cgit v1.2.3