diff options
| author | Shulhan <ms@kilabit.info> | 2019-06-14 19:02:22 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2019-06-14 19:02:22 +0700 |
| commit | 8d5ffba2d9483f049385d37bc468f2a114548eb0 (patch) | |
| tree | f545e93345f3c4273ec1b962f797bdcbc20dc80b /lib/time | |
| parent | 381a0c6e6dfc702ffbbd398abaae356f4e075a0e (diff) | |
| download | pakakeh.go-8d5ffba2d9483f049385d37bc468f2a114548eb0.tar.xz | |
ascii: new library for working with ASCII characters
This library previously part of bytes package. To make it bytes package
consistent (only working with slice of byte), we move all ASCII related
constants, variables, and functions into new package.
Diffstat (limited to 'lib/time')
| -rw-r--r-- | lib/time/duration.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/time/duration.go b/lib/time/duration.go index 3432c6b4..79bee1a0 100644 --- a/lib/time/duration.go +++ b/lib/time/duration.go @@ -9,7 +9,7 @@ import ( "strconv" "time" - libbytes "github.com/shuLhan/share/lib/bytes" + "github.com/shuLhan/share/lib/ascii" libio "github.com/shuLhan/share/lib/io" ) @@ -45,12 +45,12 @@ func ParseDuration(s string) (time.Duration, error) { reader.Init([]byte(s)) c := reader.SkipSpaces() - if !libbytes.IsDigit(c) { + if !ascii.IsDigit(c) { return 0, ErrDurationMissingValue } for { - tok, _, c := reader.ReadUntil(seps, libbytes.ASCIISpaces) + tok, _, c := reader.ReadUntil(seps, ascii.Spaces) if c == 0 { break } |
