Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: export format.Write function. closes #30
- Loading branch information
1 parent
ea0289e
commit 82bec5a
Showing
3 changed files
with
14 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,10 @@ | ||
package format | ||
|
||
import ( | ||
"log" | ||
"os" | ||
) | ||
|
||
// write a string to a file | ||
func write(stream *os.File, str string) { | ||
_, err := stream.WriteString(str) | ||
if err != nil { | ||
log.Println("captainslog error!", err) | ||
} | ||
// Write a string to a file | ||
func Write(stream *os.File, str string) { | ||
_, _ = stream.WriteString(str) | ||
} |