diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-01-30 11:34:13 -0700 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-01-30 11:36:48 -0700 |
commit | 4f6f3dcd4b8c71f5caa52864092dbde22665a645 (patch) | |
tree | 19ae4d9203774173b83c25a91d7787d88bd3aa6a /examples/finger | |
parent | 9cbc5cdd467ccd8e68f0f5d1d971ab76c2946624 (diff) |
finger protocol
Diffstat (limited to 'examples/finger')
-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() +} |