Skip to content

Commit 6a9ef3f

Browse files
committedMay 12, 2021
fix typo
comment should have function name as prefix fix potential nil pointer
1 parent 4c0ac5a commit 6a9ef3f

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed
 

‎klog.go

+2
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ func (m *moduleSpec) Get() interface{} {
284284

285285
var errVmoduleSyntax = errors.New("syntax error: expect comma-separated list of filename=N")
286286

287+
// Set will sets module value
287288
// Syntax: -vmodule=recordio=2,file=1,gfs*=3
288289
func (m *moduleSpec) Set(value string) error {
289290
var filter []modulePat
@@ -362,6 +363,7 @@ func (t *traceLocation) Get() interface{} {
362363

363364
var errTraceSyntax = errors.New("syntax error: expect file.go:234")
364365

366+
// Set will sets backtrace value
365367
// Syntax: -log_backtrace_at=gopherflakes.go:234
366368
// Note that unlike vmodule the file extension is included here.
367369
func (t *traceLocation) Set(value string) error {

‎klog_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ func BenchmarkLogs(b *testing.B) {
647647

648648
testFile, err := ioutil.TempFile("", "test.log")
649649
if err != nil {
650-
b.Error("unable to create temporary file")
650+
b.Fatal("unable to create temporary file")
651651
}
652652
defer os.Remove(testFile.Name())
653653

‎klogr/klogr.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func framesToCaller() int {
104104
return 1 // something went wrong, this is safe
105105
}
106106

107-
// trimDuplicates will deduplicates elements provided in multiple KV tuple
107+
// trimDuplicates will deduplicate elements provided in multiple KV tuple
108108
// slices, whilst maintaining the distinction between where the items are
109109
// contained.
110110
func trimDuplicates(kvLists ...[]interface{}) [][]interface{} {

0 commit comments

Comments
 (0)
Please sign in to comment.