fmt: gofmt

This commit is contained in:
jamesread 2023-02-16 16:21:53 +00:00
parent 0335e58b12
commit 11bb3f129f
3 changed files with 7 additions and 10 deletions

View File

@ -72,9 +72,7 @@ func startRestAPIServer(globalConfig *config.Config) error {
// The JSONPb.EmitDefaults is necssary, so "empty" fields are returned in JSON. // The JSONPb.EmitDefaults is necssary, so "empty" fields are returned in JSON.
mux := runtime.NewServeMux( mux := runtime.NewServeMux(
runtime.WithMetadata(func(ctx context.Context, request *http.Request) metadata.MD { runtime.WithMetadata(parseRequestMetadata),
return parseRequestMetadata(ctx, request)
}),
runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.HTTPBodyMarshaler{ runtime.WithMarshalerOption(runtime.MIMEWildcard, &runtime.HTTPBodyMarshaler{
Marshaler: &runtime.JSONPb{ Marshaler: &runtime.JSONPb{
MarshalOptions: protojson.MarshalOptions{ MarshalOptions: protojson.MarshalOptions{

View File

@ -1,10 +1,10 @@
package httpservers; package httpservers
import ( import (
"github.com/golang-jwt/jwt/v4"
"fmt"
log "github.com/sirupsen/logrus"
"errors" "errors"
"fmt"
"github.com/golang-jwt/jwt/v4"
log "github.com/sirupsen/logrus"
"net/http" "net/http"
) )
@ -65,4 +65,3 @@ func parseJwtCookie(request *http.Request) (string, string) {
return username, usergroup return username, usergroup
} }