Skip to content

Commit

Permalink
Merge pull request #15 from theoremoon/fixIndexError
Browse files Browse the repository at this point in the history
pretty fix
  • Loading branch information
theoremoon committed Nov 29, 2019
2 parents 183716f + 4af7d06 commit b472d32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/bgproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (t *target) Check() error {
if t.Url.Scheme == "unix" {
// unix socket forms unix:<socket path>:<url path>
path := strings.SplitN(t.Url.Path, ":", 2)
if len(path) == 0 {
if len(path) <= 1 {
return fmt.Errorf("Invalid url format: %s (unix domain address should be formed: unix:<socket>:<url path>)", t.Url.String())
}
r, err = httpc.Get("http://unix/" + path[1])
Expand Down

0 comments on commit b472d32

Please sign in to comment.