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

Commit

Permalink
Fix docs for functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gongled committed Nov 19, 2017
1 parent 2768d4b commit c3556c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions handler/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func Write(p []byte) (n int, err error) {
return Global.Write(p)
}

//
// Truncate truncates file
func Truncate() error {
return Global.Truncate()
}
Expand Down Expand Up @@ -109,7 +109,7 @@ func (h *FileHandler) Set(path string, perms os.FileMode, duration int64) error
return err
}

// Path
// Path returns path
func (h *FileHandler) Path() string {
return h.path
}
Expand Down Expand Up @@ -148,7 +148,7 @@ func (h *FileHandler) Write(p []byte) (int, error) {
return n, err
}

//
// Truncate truncates file
func (h *FileHandler) Truncate() error {
if h == nil {
return ErrFileHandlerIsNil
Expand Down
4 changes: 2 additions & 2 deletions logging/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type FileLogger struct {
maxFileSize uint64 //
}

// Logging time format
// FILE_LOGGER_FORMAT Logging time format
const FILE_LOGGER_FORMAT = "02/Jan/2006:15:04:05"

// Sort interface
Expand Down Expand Up @@ -250,7 +250,7 @@ func (l *FileLogger) IsMaxFileSizeReached(entry string) bool {
return (l.GetMaxFileSize() != 0) && (l.w.Size()+uint64(len(entry)) >= uint64(l.GetMaxFileSize()))
}

// isMaxFileAgeReached checks if maximum file age is reached
// IsMaxFileAgeReached checks if maximum file age is reached
func (l *FileLogger) IsMaxFileAgeReached() bool {
return (int64(time.Now().Unix()) > l.w.ExpirationTime()) && (l.w.ExpirationTime() != 0)
}
Expand Down

0 comments on commit c3556c7

Please sign in to comment.