Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/cmd/cover/func.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ func funcOutput(profile, outputFile string) error {
}
funcs, err := findFuncs(file)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
continue
}
return err
}
// Now match up functions and profile blocks.
Expand Down
4 changes: 4 additions & 0 deletions src/cmd/cover/html.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package main
import (
"bufio"
"cmd/internal/browser"
"errors"
"fmt"
"html/template"
"io"
Expand Down Expand Up @@ -45,6 +46,9 @@ func htmlOutput(profile, outfile string) error {
}
src, err := os.ReadFile(file)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
continue
}
return fmt.Errorf("can't read %q: %v", fn, err)
}
var buf strings.Builder
Expand Down