Skip to content

Commit

Permalink
unexport error
Browse files Browse the repository at this point in the history
  • Loading branch information
kasey committed May 19, 2022
1 parent e3f9f87 commit 7cead8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/client/beacon/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const (
IdHead StateOrBlockId = "head"
)

var ErrMalformedHostname = errors.New("hostname must include port, separated by one colon, like example.com:3500")
var errMalformedHostname = errors.New("hostname must include port, separated by one colon, like example.com:3500")

// IdFromRoot encodes a block root in the format expected by the API in places where a root can be used to identify
// a BeaconState or SignedBeaconBlock.
Expand Down Expand Up @@ -126,7 +126,7 @@ func urlForHost(h string) (*url.URL, error) {
// try to parse as host:port
host, port, err := net.SplitHostPort(h)
if err != nil {
return nil, ErrMalformedHostname
return nil, errMalformedHostname
}
return &url.URL{Host: fmt.Sprintf("%s:%s", host, port), Scheme: "http"}, nil
}
Expand Down
2 changes: 1 addition & 1 deletion api/client/beacon/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func TestValidHostname(t *testing.T) {
{
name: "hostname without port",
hostArg: "mydomain.org",
err: ErrMalformedHostname,
err: errMalformedHostname,
},
{
name: "hostname with port",
Expand Down

0 comments on commit 7cead8c

Please sign in to comment.