Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Adjust the word order of comments #947

Merged
merged 2 commits into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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, and 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