summaryrefslogtreecommitdiff
path: root/examples/finger/main.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-01-30 11:34:13 -0700
committertjpcc <tjp@ctrl-c.club>2023-01-30 11:36:48 -0700
commit4f6f3dcd4b8c71f5caa52864092dbde22665a645 (patch)
tree19ae4d9203774173b83c25a91d7787d88bd3aa6a /examples/finger/main.go
parent9cbc5cdd467ccd8e68f0f5d1d971ab76c2946624 (diff)
finger protocol
Diffstat (limited to 'examples/finger/main.go')
-rw-r--r--examples/finger/main.go27
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()
+}