caddy/internal/caddyscript/lib/lib.go
dev 27ecc7f384 Protocol and Caddyscript matchers
* Added matcher to determine what protocol the request is being made by
  - grpc, tls, http
* Added ability to run caddyscript in a matcher to evaluate the http request
* Added TLS field to caddyscript request time
* Added a library to manipulate and compare a new caddyscript time type
* Library for regex in starlark
2019-04-08 09:58:11 -04:00

11 lines
253 B
Go

package caddyscript
import (
"fmt"
"go.starlark.net/starlark"
)
func invalidReciever(v starlark.Value, want string) (starlark.Value, error) {
return starlark.None, fmt.Errorf("invalid receiver: receiver set to type %v, want %v", v.Type(), want)
}