Skip to content

Commit

Permalink
upstream: add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
schzhn committed Jan 30, 2024
1 parent 83e1561 commit 313c715
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions upstream/upstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ func AddressToUpstream(addr string, opts *Options) (u Upstream, err error) {

// validateUpstreamURL returns an error if the upstream URL is not valid.
func validateUpstreamURL(u *url.URL) (err error) {
switch u.Scheme {
case "sdns":
if u.Scheme == "sdns" {
return nil
}

host := u.Host
// TODO(s.chzhen): Consider using [netutil.SplitHostPort].
h, port, splitErr := net.SplitHostPort(host)
if splitErr == nil {
// Validate port.
Expand Down

0 comments on commit 313c715

Please sign in to comment.