(options []string)
| 3 | import "strings" |
| 4 | |
| 5 | func CreateRouteOptions(options []string) (map[string]*string, *string) { |
| 6 | routeOptions := map[string]*string{} |
| 7 | for _, option := range options { |
| 8 | key, value, found := strings.Cut(option, "=") |
| 9 | if found { |
| 10 | routeOptions[key] = &value |
| 11 | } else { |
| 12 | return routeOptions, &option |
| 13 | } |
| 14 | } |
| 15 | return routeOptions, nil |
| 16 | } |
| 17 | |
| 18 | func RemoveRouteOptions(options []string) map[string]*string { |
| 19 | routeOptions := map[string]*string{} |