-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The clog package has been added, to which the Fatal* functions have been moved, and the Print* and Panic* functions have been added.
- Loading branch information
Showing
7 changed files
with
132 additions
and
59 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,6 +1,3 @@ | ||
install: | ||
go install . | ||
|
||
check: | ||
@echo "running tests..." | ||
@go test -count 1 -v ./... | ||
|
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package clog | ||
|
||
import ( | ||
"log" | ||
|
||
"github.com/i582/cfmt/cmd/cfmt" | ||
) | ||
|
||
// Printf is the same as log.Printf. | ||
func Printf(format string, a ...interface{}) { | ||
log.Print(cfmt.Sprintf(format, a...)) | ||
} | ||
|
||
// Print is the same as log.Print. | ||
func Print(a ...interface{}) { | ||
log.Print(cfmt.Sprint(a...)) | ||
} | ||
|
||
// Println is the same as log.Println. | ||
func Println(a ...interface{}) { | ||
log.Println(cfmt.Sprint(a...)) | ||
} | ||
|
||
// Fatalf is the same as log.Fatalf. | ||
func Fatalf(format string, a ...interface{}) { | ||
log.Fatal(cfmt.Sprintf(format, a...)) | ||
} | ||
|
||
// Fatal is the same as log.Fatal. | ||
func Fatal(a ...interface{}) { | ||
log.Fatal(cfmt.Sprint(a...)) | ||
} | ||
|
||
// Fatalln is the same as log.Fatalln. | ||
func Fatalln(a ...interface{}) { | ||
log.Fatalln(cfmt.Sprint(a...)) | ||
} | ||
|
||
// Panicf is the same as log.Panicf. | ||
func Panicf(format string, a ...interface{}) { | ||
log.Panic(cfmt.Sprintf(format, a...)) | ||
} | ||
|
||
// Panic is the same as log.Panic. | ||
func Panic(a ...interface{}) { | ||
log.Panic(cfmt.Sprint(a...)) | ||
} | ||
|
||
// Panicln is the same as log.Panicln. | ||
func Panicln(a ...interface{}) { | ||
log.Panicln(cfmt.Sprint(a...)) | ||
} |
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