navigator/api/beacon/api.go

19 lines
336 B
Go
Raw Normal View History

package beacon
import (
"fmt"
"net/http"
)
var (
apiServeMux = http.NewServeMux()
)
func init() {
http.Handle("/beacon/", http.StripPrefix("/beacon", apiServeMux))
}
func RegisterApi(version string, handler http.Handler) {
apiServeMux.Handle(fmt.Sprintf("/%s/", version), http.StripPrefix(fmt.Sprint("/", version), handler))
}