mirror of
https://github.com/MontFerret/ferret.git
synced 2025-07-05 00:49:00 +02:00
Externalized common timeout values (#371)
* Externalized common timeout values * Updated go.sum
This commit is contained in:
@ -10,8 +10,6 @@ import (
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values/types"
|
||||
)
|
||||
|
||||
const defaultTimeout = 5000
|
||||
|
||||
func RegisterLib(ns core.Namespace) error {
|
||||
return ns.RegisterFunctions(core.Functions{
|
||||
"ATTR_GET": AttributeGet,
|
||||
@ -74,6 +72,7 @@ func RegisterLib(ns core.Namespace) error {
|
||||
|
||||
func OpenOrCastPage(ctx context.Context, value core.Value) (drivers.HTMLPage, bool, error) {
|
||||
err := core.ValidateType(value, drivers.HTMLPageType, types.String)
|
||||
|
||||
if err != nil {
|
||||
return nil, false, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user