• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

x1unix / go-playground / 15595931129

11 Jun 2025 09:19PM UTC coverage: 75.204%. Remained the same
15595931129

push

github

web-flow
chore(deps): bump brace-expansion from 1.1.11 to 1.1.12 in /web (#504)

Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

737 of 980 relevant lines covered (75.2%)

5.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

63.16
/internal/builder/error.go
1
package builder
2

3
import (
4
        "bytes"
5
        "context"
6
        "errors"
7
        "fmt"
8
)
9

10
// BuildError is build error
11
type BuildError struct {
12
        message string
13
}
14

15
// Error implements error
16
func (e *BuildError) Error() string {
13✔
17
        return e.message
13✔
18
}
13✔
19

20
func newBuildError(msg string, args ...any) *BuildError {
14✔
21
        if len(args) > 0 {
21✔
22
                msg = fmt.Sprintf(msg, args...)
7✔
23
        }
7✔
24

25
        return &BuildError{message: msg}
14✔
26
}
27

28
func IsBuildError(err error) bool {
×
29
        if err == nil {
×
30
                return false
×
31
        }
×
32

33
        dst := new(BuildError)
×
34
        return errors.As(err, &dst)
×
35
}
36

37
func checkContextErrors(err error) (error, bool) {
2✔
38
        if err == nil {
3✔
39
                return nil, false
1✔
40
        }
1✔
41

42
        if errors.Is(err, context.Canceled) {
1✔
43
                return err, true
×
44
        }
×
45

46
        if errors.Is(err, context.DeadlineExceeded) {
1✔
47
                return newBuildError("Go program build timeout exceeded"), true
×
48
        }
×
49

50
        return nil, false
1✔
51
}
52

53
func formatBuildError(ctx context.Context, err error, buff *bytes.Buffer) error {
2✔
54
        if buff.Len() > 0 {
3✔
55
                return newBuildError(buff.String())
1✔
56
        }
1✔
57

58
        newErr, ok := checkContextErrors(err)
1✔
59
        if ok {
1✔
60
                return newErr
×
61
        }
×
62

63
        newErr, ok = checkContextErrors(ctx.Err())
1✔
64
        if ok {
1✔
65
                return newErr
×
66
        }
×
67

68
        return newBuildError("Build process returned an error: %s", err)
1✔
69
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc