Skip to content

Commit

Permalink
style: Format comments by go 1.20
Browse files Browse the repository at this point in the history
Go formatter whose version is above 1.19 formats comments as well, see:
https://go.dev/blog/go1.19.

Signed-off-by: Xuewei Niu <justxuewei@apache.org>
  • Loading branch information
justxuewei committed Mar 29, 2023
1 parent 34db0b2 commit e9a6e8c
Show file tree
Hide file tree
Showing 35 changed files with 616 additions and 591 deletions.
2 changes: 1 addition & 1 deletion common/constant/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const (
MaxServerRecvMsgSize = "max-server-recv-msg-size"
)

//tls constant
// tls constant
const (
TLSKey = "tls_key"
TLSCert = "tls_cert"
Expand Down
2 changes: 1 addition & 1 deletion common/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ func (c *URL) GetNonDefaultParam(s string) (string, bool) {
r = c.params.Get(s)
}

return r, r != ""
return r, r != ""
}

// GetParams gets values
Expand Down
5 changes: 3 additions & 2 deletions config/config_center_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ func (c *CenterConfig) GetUrlMap() url.Values {
return urlMap
}

//translateConfigAddress translate config address
// eg:address=nacos://127.0.0.1:8848 will return 127.0.0.1:8848 and protocol will set nacos
// translateConfigAddress translate config address
//
// eg:address=nacos://127.0.0.1:8848 will return 127.0.0.1:8848 and protocol will set nacos
func (c *CenterConfig) translateConfigAddress() string {
if strings.Contains(c.Address, "://") {
translatedUrl, err := url.Parse(c.Address)
Expand Down
3 changes: 1 addition & 2 deletions config/config_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ func registerServiceInstance() {
}
}

//
//// nolint
// // nolint
func createInstance(url *common.URL) (registry.ServiceInstance, error) {
appConfig := GetApplicationConfig()
port, err := strconv.ParseInt(url.Port, 10, 32)
Expand Down
2 changes: 1 addition & 1 deletion config/graceful_shutdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ func waitingProviderProcessedTimeout(shutdownConfig *ShutdownConfig) {
}
}

//for provider. It will wait for processing receiving requests
// for provider. It will wait for processing receiving requests
func waitForSendingAndReceivingRequests() {
logger.Info("Graceful shutdown --- Keep waiting until sending/accepting requests finish or timeout. ")
if rootConfig == nil || rootConfig.Shutdown == nil {
Expand Down
1 change: 0 additions & 1 deletion config/metadata_report_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func publishServiceDefinition(url *common.URL) {
}
}

//
// selectMetadataServiceExportedURL get already be exported url
func selectMetadataServiceExportedURL() *common.URL {
var selectedUrl *common.URL
Expand Down
Loading

0 comments on commit e9a6e8c

Please sign in to comment.