• 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

52.94
/pkg/util/cmdutil/flags.go
1
package cmdutil
2

3
import (
4
        "encoding"
5
        "strconv"
6
        "strings"
7
)
8

9
const csvSeparator = ","
10

11
// StringsListValue is comma-separated list of values that implements flag.Value interface.
12
type StringsListValue []string
13

14
// String implements flag.Value
15
func (s StringsListValue) String() string {
2✔
16
        if len(s) == 0 {
3✔
17
                return ""
1✔
18
        }
1✔
19

20
        return strconv.Quote(strings.Join(s, csvSeparator))
1✔
21
}
22

23
// Set implements flag.Value
24
func (s *StringsListValue) Set(s2 string) error {
1✔
25
        vals := strings.Split(s2, csvSeparator)
1✔
26
        filteredVals := make([]string, 0, len(vals))
1✔
27
        for _, v := range vals {
5✔
28
                v = strings.TrimSpace(v)
4✔
29
                if v == "" {
6✔
30
                        continue
2✔
31
                }
32
                filteredVals = append(filteredVals, v)
2✔
33
        }
34

35
        *s = filteredVals
1✔
36
        return nil
1✔
37
}
38

39
// NewStringsListValue returns a new StringsListValue
40
func NewStringsListValue(p *[]string) *StringsListValue {
1✔
41
        return (*StringsListValue)(p)
1✔
42
}
1✔
43

44
// TextUnmarshalerValue is flag.Value adapter for values
45
// which implement encoding.TextUnmarshaler interface.
46
type TextUnmarshalerValue struct {
47
        dest encoding.TextUnmarshaler
48
}
49

50
func NewTextUnmarshalerValue(dest encoding.TextUnmarshaler) *TextUnmarshalerValue {
×
51
        return &TextUnmarshalerValue{dest: dest}
×
52
}
×
53

54
func (t *TextUnmarshalerValue) WithDefaults(defaultValue string) *TextUnmarshalerValue {
×
55
        _ = t.dest.UnmarshalText([]byte(defaultValue))
×
56
        return t
×
57
}
×
58

59
// Set implements flag.Value
60
func (t TextUnmarshalerValue) Set(v string) error {
×
61
        return t.dest.UnmarshalText([]byte(v))
×
62
}
×
63

64
// String implements flag.Value
65
func (t TextUnmarshalerValue) String() string {
×
66
        if m, ok := t.dest.(encoding.TextMarshaler); ok {
×
67
                v, _ := m.MarshalText()
×
68
                return strconv.Quote(string(v))
×
69
        }
×
70

71
        return ""
×
72
}
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