Skip to content

Commit

Permalink
Fix File.Save() documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
System-Glitch committed Jan 11, 2020
1 parent df23af0 commit 1beaee7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs_src/src/guide/advanced/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Writes the given file on the disk.
Appends a timestamp to the given file name to avoid duplicate file names.
The file is not readable anymore once saved as its FileReader has already been closed.

Returns the actual path to the saved file.
Returns the actual file name.

| Parameters | Return |
|------------------------|----------|
Expand Down
2 changes: 1 addition & 1 deletion helper/filesystem/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type File struct {
// The file is not readable anymore once saved as its FileReader has already been
// closed.
//
// Returns the actual path to the saved file.
// Returns the actual file name.
func (file *File) Save(path string, name string) string {
name = timestampFileName(name)
writer, err := os.OpenFile(path+string(os.PathSeparator)+name, os.O_WRONLY|os.O_CREATE, 0660)
Expand Down

0 comments on commit 1beaee7

Please sign in to comment.