diff options
Diffstat (limited to 'examples/inspectls')
-rw-r--r-- | examples/inspectls/main.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/inspectls/main.go b/examples/inspectls/main.go index ce82f43..485b84e 100644 --- a/examples/inspectls/main.go +++ b/examples/inspectls/main.go @@ -54,11 +54,11 @@ func envConfig() (string, string) { return certfile, keyfile } -func inspectHandler(ctx context.Context, req *gus.Request) *gus.Response { +var inspectHandler = gus.HandlerFunc(func(ctx context.Context, req *gus.Request) *gus.Response { // build and return a ```-wrapped description of the connection TLS state body := "```\n" + displayTLSState(req.TLSState) + "\n```" return gemini.Success("text/gemini", bytes.NewBufferString(body)) -} +}) func displayTLSState(state *tls.ConnectionState) string { builder := &strings.Builder{} |