deno.land / x / esm@v135_2 / server / storage / common.go

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package storage
import ( "errors" "net/url" "time"
"github.com/ije/gox/utils")
var ( ErrNotFound = errors.New("not found") ErrExpired = errors.New("record is expired"))
func parseConfigUrl(configUrl string) (root string, options url.Values, err error) { root, query := utils.SplitByFirstByte(configUrl, '?') if query != "" { options, err = url.ParseQuery(query) if err != nil { return root, nil, err } } return root, options, nil}
func parseDurationValue(str string, defaultValue time.Duration) (time.Duration, error) { if str != "" { return time.ParseDuration(str) } return defaultValue, nil}
esm

Version Info

Tagged at
a year ago