func (n *node) add(path string, handler http.HandlerFunc) {
	current := n
	trimmed := strings.TrimPrefix(path, "/")
	slice := strings.Split(trimmed, "/")
	for _, k := range slice {
		var param string
		if len(k) > 1 && string(k[0]) == ":" {
			param = strings.TrimPrefix(k, ":")
			k = "*"
		}
		next, ok := current.children[k]
		if !ok {
			next = &node{
				path:     path,
				key:      k,
				children: make(map[string]*node),
				param:    param,
			}
			current.children[k] = next
		}
		current = next
	}
	current.handler = handler
}
add method adds a new path to the trie.
package sariaf
import (
	"context"
	"net/http"
	"strings"
)
var methods = map[string]string{
	"GET":    http.MethodGet,
	"POST":   http.MethodPost,
	"PUT":    http.MethodPut,
	"DELETE": http.MethodDelete,
	"PATCH":  http.MethodPatch,
	"HEAD":   http.MethodHead,
}
type node struct {
	path     string
	key      string
	children map[string]*node
	handler  http.HandlerFunc
	param    string
}