Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build tag regex pattern update #1869

Merged
merged 2 commits into from
Mar 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion adapters/repos/db/disk_use.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (d diskUse) percentUsed() float64 {
func (d diskUse) String() string {
GB := 1024 * 1024 * 1024

return fmt.Sprintf("total: %.2fGB, free: %.2fGB, used: %.2fGB (avail: %.2fGF)",
return fmt.Sprintf("total: %.2fGB, free: %.2fGB, used: %.2fGB (avail: %.2fGB)",
float64(d.total)/float64(GB),
float64(d.free)/float64(GB),
float64(d.total-d.free)/float64(GB),
Expand Down
2 changes: 1 addition & 1 deletion tools/license_headers/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var (

func init() {
headerSectionRe = regexp.MustCompile(`^(//.*\n)*\n`)
buildTagRe = regexp.MustCompile(`^//\s\+build`)
buildTagRe = regexp.MustCompile(`^//go:build`)
h, err := ioutil.ReadFile("tools/license_headers/header.txt")
fatal(err)
targetHeader = bytes.TrimSpace(h)
Expand Down