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

Commit

Permalink
Adjust the word order of comments
Browse files Browse the repository at this point in the history
Signed-off-by: yuxiaobo <[email protected]>
  • Loading branch information
yuxiaobo96 committed Sep 20, 2019
1 parent a37632b commit 7745895
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/supernode/app/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewOptions() *Options {
}
}

// Options store the values that comes from command line parameters.
// Options stores the values that comes from command line parameters.
type Options struct {
*config.BaseProperties
}
2 changes: 1 addition & 1 deletion dfdaemon/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ func certPoolFromFiles(files ...string) (*x509.CertPool, error) {
return roots, nil
}

// Proxy describe a regular expression matching rule for how to proxy a request
// Proxy describes a regular expression matching rule for how to proxy a request
type Proxy struct {
Regx *Regexp `yaml:"regx" json:"regx"`
UseHTTPS bool `yaml:"use_https" json:"use_https"`
Expand Down
2 changes: 1 addition & 1 deletion dfdaemon/constant/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const (
)

const (
// DefaultConfigPath the default path of dfdaemon configuration file.
// DefaultConfigPath is the default path of dfdaemon configuration file.
DefaultConfigPath = "/etc/dragonfly/dfdaemon.yml"
)

Expand Down
4 changes: 2 additions & 2 deletions dfdaemon/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (proxy *Proxy) mirrorRegistry(w http.ResponseWriter, r *http.Request) {
}

// remoteConfig returns the tls.Config used to connect to the given remote host.
// If the host should not be hijacked, nil will be returned.
// If the host should not be hijacked, it will return nil.
func (proxy *Proxy) remoteConfig(host string) *tls.Config {
for _, h := range proxy.httpsHosts {
if h.Regx.MatchString(host) {
Expand All @@ -202,7 +202,7 @@ func (proxy *Proxy) remoteConfig(host string) *tls.Config {
return nil
}

// SetRules change the rule lists of the proxy to the given rules
// SetRules changes the rule lists of the proxy to the given rules
func (proxy *Proxy) SetRules(rules []*config.Proxy) error {
proxy.rules = rules
return nil
Expand Down
2 changes: 1 addition & 1 deletion dfdaemon/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ type Server struct {
// Option is the functional option for creating a server
type Option func(s *Server) error

// WithTLSFromFile sets the tls config for the server from the given key pair file
// WithTLSFromFile sets the TLS config for the server from the given key pair file
func WithTLSFromFile(certFile, keyFile string) Option {
return func(s *Server) error {
if s.server.TLSConfig == nil {
Expand Down
4 changes: 2 additions & 2 deletions dfdaemon/transport/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type DFRoundTripper struct {
Downloader downloader.Interface
}

// New return the default DFRoundTripper.
// New returns the default DFRoundTripper.
func New(opts ...Option) (*DFRoundTripper, error) {
rt := &DFRoundTripper{
Round: defaultHTTPTransport(nil),
Expand All @@ -71,7 +71,7 @@ func New(opts ...Option) (*DFRoundTripper, error) {
// Option is functional config for DFRoundTripper
type Option func(rt *DFRoundTripper) error

// WithTLS configures tls config used for http transport
// WithTLS configures TLS config used for http transport
func WithTLS(cfg *tls.Config) Option {
return func(rt *DFRoundTripper) error {
rt.Round = defaultHTTPTransport(cfg)
Expand Down

0 comments on commit 7745895

Please sign in to comment.