toAnySlice converts a []string to []any for storage in a map[string]any.
(ss []string)
| 79 | |
| 80 | // toAnySlice converts a []string to []any for storage in a map[string]any. |
| 81 | func toAnySlice(ss []string) []any { |
| 82 | out := make([]any, len(ss)) |
| 83 | for i, s := range ss { |
| 84 | out[i] = s |
| 85 | } |
| 86 | return out |
| 87 | } |
| 88 | |
| 89 | // NewTools creates a new Tools instance from a map |
| 90 | func NewTools(toolsMap map[string]any) *Tools { |