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

echocat / cli4g / 38708753557

15 Oct 2026 08:51AM UTC coverage: 84.33%. First build
38708753557

push

github

blaubaer
Initial commit

4010 of 4737 new or added lines in 98 files covered. (84.65%)

4117 of 4882 relevant lines covered (84.33%)

2138.66 hits per line

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

88.24
/codec/string.go
1
package codec
2

3
import (
4
        "context"
5
        "reflect"
6
)
7

8
func NewString() Codec[string, string] {
9
        return stringValue{}
1,032 ✔
10
}
1,032 ✔
11

12
type stringValue struct{}
13

14
func (this stringValue) ToRaw(ctx context.Context) Codec[any, any] { return Raw(ctx, this) }
492 ✔
15

16
func (this stringValue) CanHandleType(ctx context.Context, t reflect.Type) (bool, error) {
17
        return t == reflect.TypeFor[string](), ctx.Err()
696 ✔
18
}
696 ✔
19

20
func (this stringValue) ExpectMinMax(context.Context, Usage) (int, int) {
21
        return 1, 1
816 ✔
22
}
816 ✔
23

24
func (this stringValue) ParseRequirement(ctx context.Context, usg Usage, args ...string) (string, error) {
25
        if err := EnsureArgumentsMatching(ctx, usg, this, args...); err != nil {
348 ✔
NEW
26
                return "", err
×
NEW
27
        }
×
28
        return args[0], nil
348 ✔
29
}
30

31
func (this stringValue) FormatRequirement(_ context.Context, v string) ([]string, error) {
32
        return []string{v}, nil
138 ✔
33
}
138 ✔
34

35
func (stringValue) CloneRequirement(ctx context.Context, value string) (string, error) {
36
        return value, ctx.Err()
18 ✔
37
}
18 ✔
38

39
func (stringValue) Resolve(ctx context.Context, _ Scope, value string) (string, error) {
40
        return value, ctx.Err()
210 ✔
41
}
210 ✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc