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

Commit

Permalink
Merge pull request #777 from 928234269/longfei_fix
Browse files Browse the repository at this point in the history
fix some typos in comment
  • Loading branch information
starnop authored Aug 2, 2019
2 parents 0da3300 + 38fd803 commit b7bce11
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions common/util/net_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func GetAllIPs() (ipList []string, err error) {
return
}

// ConvertTimeStringToInt converts a string time to a int64 timestamp.
// ConvertTimeStringToInt converts a string time to an int64 timestamp.
func ConvertTimeStringToInt(timeStr string) (int64, error) {
formatTime, err := time.ParseInLocation(http.TimeFormat, timeStr, time.UTC)
if err != nil {
Expand All @@ -250,7 +250,7 @@ func ConvertTimeStringToInt(timeStr string) (int64, error) {
return formatTime.Unix() * int64(1000), nil
}

// ConvertTimeIntToString converts a int64 timestamp to a string time.
// ConvertTimeIntToString converts an int64 timestamp to a string time.
func ConvertTimeIntToString(timestamp int64) (string, error) {
localTime := time.Unix(timestamp/int64(1000), 0)
timeString := localTime.UTC().Format(http.TimeFormat)
Expand Down
2 changes: 1 addition & 1 deletion common/util/sync_map_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func (mmap *SyncMap) ListKeyAsStringSlice() (result []string) {
return
}

// ListKeyAsIntSlice returns the list of keys as a int slice.
// ListKeyAsIntSlice returns the list of keys as an int slice.
func (mmap *SyncMap) ListKeyAsIntSlice() (result []int) {
if mmap == nil {
return []int{}
Expand Down
2 changes: 1 addition & 1 deletion dfget/core/downloader/p2p_downloader/power_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (s *PowerClientTestSuite) upServer(port int) {
go http.Serve(s.ln, nil)
}

// downloadMockAPI is an mock implementation of interface DownloadAPI.
// downloadMockAPI is a mock implementation of interface DownloadAPI.
type downloadMockAPI struct {
}

Expand Down
2 changes: 1 addition & 1 deletion dfget/core/regist/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func getTaskPath(taskFileName string) string {
return ""
}

// NewRegisterResult creates a instance of RegisterResult.
// NewRegisterResult creates an instance of RegisterResult.
func NewRegisterResult(node string, remainder []string, url string,
taskID string, fileLen int64, pieceSize int32) *RegisterResult {
return &RegisterResult{
Expand Down
4 changes: 2 additions & 2 deletions supernode/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/dragonflyoss/Dragonfly/common/util"
)

// NewConfig create a instant with default values.
// NewConfig create an instant with default values.
func NewConfig() *Config {
return &Config{
BaseProperties: NewBaseProperties(),
Expand Down Expand Up @@ -67,7 +67,7 @@ func (c *Config) IsSuperPID(peerID string) bool {
return peerID == c.superNodePID
}

// NewBaseProperties create a instant with default values.
// NewBaseProperties create an instant with default values.
func NewBaseProperties() *BaseProperties {
home := filepath.Join(string(filepath.Separator), "home", "admin", "supernode")
return &BaseProperties{
Expand Down

0 comments on commit b7bce11

Please sign in to comment.