Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Use constant blocks to define constants instead of discrete definitions.
Browse files Browse the repository at this point in the history
Signed-off-by: xichengliudui <[email protected]>
  • Loading branch information
xichengliudui committed Aug 15, 2019
1 parent b4143fc commit 7174701
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions client/httputils.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,20 @@ import (
"time"
)

// UnixScheme is a scheme for unix.
const UnixScheme = "unix"
const (

// TCPScheme is a scheme for TCP.
const TCPScheme = "tcp"
// UnixScheme is a scheme for unix.
UnixScheme = "unix"

// HTTPScheme is a scheme for HTTP.
const HTTPScheme = "http"
// TCPScheme is a scheme for TCP.
TCPScheme = "tcp"

// HTTPSScheme is a scheme for HTTPS.
const HTTPSScheme = "https"
// HTTPScheme is a scheme for HTTP.
HTTPScheme = "http"

// HTTPSScheme is a scheme for HTTPS.
HTTPSScheme = "https"
)

// ParseHost inputs a host address string, and output four type:
// url.URL, basePath, address without scheme and an error.
Expand Down

0 comments on commit 7174701

Please sign in to comment.