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

Commit 4186e93

Browse files
committed
add dot and conjunction
Signed-off-by: yuxiaobo <[email protected]>
1 parent 7745895 commit 4186e93

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

dfdaemon/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ func certPoolFromFiles(files ...string) (*x509.CertPool, error) {
364364
return roots, nil
365365
}
366366

367-
// Proxy describes a regular expression matching rule for how to proxy a request
367+
// Proxy describes a regular expression matching rule for how to proxy a request.
368368
type Proxy struct {
369369
Regx *Regexp `yaml:"regx" json:"regx"`
370370
UseHTTPS bool `yaml:"use_https" json:"use_https"`

dfdaemon/proxy/proxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func (proxy *Proxy) mirrorRegistry(w http.ResponseWriter, r *http.Request) {
188188
}
189189

190190
// remoteConfig returns the tls.Config used to connect to the given remote host.
191-
// If the host should not be hijacked, it will return nil.
191+
// If the host should not be hijacked, and it will return nil.
192192
func (proxy *Proxy) remoteConfig(host string) *tls.Config {
193193
for _, h := range proxy.httpsHosts {
194194
if h.Regx.MatchString(host) {
@@ -202,7 +202,7 @@ func (proxy *Proxy) remoteConfig(host string) *tls.Config {
202202
return nil
203203
}
204204

205-
// SetRules changes the rule lists of the proxy to the given rules
205+
// SetRules changes the rule lists of the proxy to the given rules.
206206
func (proxy *Proxy) SetRules(rules []*config.Proxy) error {
207207
proxy.rules = rules
208208
return nil

dfdaemon/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type Server struct {
4141
// Option is the functional option for creating a server
4242
type Option func(s *Server) error
4343

44-
// WithTLSFromFile sets the TLS config for the server from the given key pair file
44+
// WithTLSFromFile sets the TLS config for the server from the given key pair file.
4545
func WithTLSFromFile(certFile, keyFile string) Option {
4646
return func(s *Server) error {
4747
if s.server.TLSConfig == nil {

dfdaemon/transport/transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func New(opts ...Option) (*DFRoundTripper, error) {
7171
// Option is functional config for DFRoundTripper
7272
type Option func(rt *DFRoundTripper) error
7373

74-
// WithTLS configures TLS config used for http transport
74+
// WithTLS configures TLS config used for http transport.
7575
func WithTLS(cfg *tls.Config) Option {
7676
return func(rt *DFRoundTripper) error {
7777
rt.Round = defaultHTTPTransport(cfg)

0 commit comments

Comments
 (0)