Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
cosnicolaou committed Oct 7, 2024
1 parent f8c543c commit ed62ea1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ linters:
- govet
- ineffassign
- misspell
- exportloopref
- copyloopvar
- staticcheck
- typecheck
- unconvert
Expand Down
2 changes: 1 addition & 1 deletion cmdline/gendoc/gendoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func writeOutput(out string, runGoFmt bool) error {
tagsConstraint = fmt.Sprintf("// +build %s\n\n", flagTags)
}

copyright := `// Copyright 2022 The Vanadium Authors. All rights reserved.
copyright := `// Copyright 2024 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
Expand Down
9 changes: 4 additions & 5 deletions cmdline/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"bytes"
"flag"
"fmt"
"go/doc"
"go/doc/comment"
"io"
"path/filepath"
"regexp"
Expand Down Expand Up @@ -165,12 +165,11 @@ func godocHeader(path, short string) string {
// We try our best to create a header that includes both the command path and
// the short description, but if godoc won't extract a header out of the line,
// we fall back to just returning the command path.
//
// For more details see the comments and implementation of doc.ToHTML:
// http://golang.org/pkg/go/doc/#ToHTML
header := firstRuneToUpper(path + " - " + short)
var buf bytes.Buffer
doc.ToHTML(&buf, "before\n\n"+header+"\n\nafter", nil)
var p comment.Parser
d := p.Parse("before\n\n" + header + "\n\nafter")
buf.Write(new(comment.Printer).HTML(d))
if !bytes.Contains(buf.Bytes(), []byte("<h")) {
return firstRuneToUpper(path)
}
Expand Down
3 changes: 1 addition & 2 deletions nsync/cv_timeout_stress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
package nsync_test

import (
"fmt"
"math/rand"
"testing"
"time"
Expand Down Expand Up @@ -135,7 +134,7 @@ func TestCVTimeoutStress(t *testing.T) {
}
s.mu.AssertHeld()
if s.refs != 0 {
t.Fatalf(fmt.Sprintf("s.refs == %d; expected 0 at end of TestCVWaitStress", s.refs))
t.Fatalf("s.refs == %d; expected 0 at end of TestCVWaitStress", s.refs)
}

s.mu.AssertHeld()
Expand Down

0 comments on commit ed62ea1

Please sign in to comment.