Update go dep (#1560)

This fix updates go dep with `dep ensure --update` as well as the following:
- Removed github.com/ugorji/go restriction in Gopkg.toml (fixes  #1557)
- Added github.com/flynn/go-shlex in Makefile (neede by Caddy, maybe removed later)

This fix fixes #1557

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang
2018-02-23 12:10:34 -08:00
committed by Miek Gieben
parent 9047bdf3a0
commit 604c0045e7
563 changed files with 107278 additions and 95314 deletions

View File

@@ -19,6 +19,7 @@ import (
"io/ioutil"
"log"
"net/http"
"net/url"
"path/filepath"
"strings"
"time"
@@ -43,7 +44,10 @@ func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func(
if strings.HasPrefix(path, "http") {
return remote
}
return func(pth string) ([]byte, error) { return local(filepath.FromSlash(pth)) }
return func(pth string) ([]byte, error) {
upth, _ := url.PathUnescape(pth)
return local(filepath.FromSlash(upth))
}
}
func loadHTTPBytes(timeout time.Duration) func(path string) ([]byte, error) {