helpers.go

 1package main
 2
 3import (
 4	"reflect"
 5
 6	"github.com/gofrs/uuid"
 7	"github.com/tomwright/queryparam/v4"
 8)
 9
10func stringPtr(s string) *string {
11	return &s
12}
13
14func init() {
15	queryparam.DefaultParser.ValueParsers[reflect.TypeOf(uuid.UUID{})] = func(value string, _ string) (reflect.Value, error) {
16		id, err := uuid.FromString(value)
17		return reflect.ValueOf(id), err
18	}
19}