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

salsadigitalauorg / shipshape / 17874139241

20 Sep 2025 02:31AM UTC coverage: 59.972% (-7.0%) from 66.972%
17874139241

push

github

web-flow
Merge pull request #88 from salsadigitalauorg/chore/fix-vulnerable-dependencies

chore: update Go version and dependencies

3470 of 5786 relevant lines covered (59.97%)

5.1 hits per line

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

0.0
/pkg/internal/testutils_command.go
1
package internal
2

3
import (
4
        "strings"
5

6
        "github.com/salsadigitalauorg/shipshape/pkg/command"
7
)
8

9
type TestShellCommand struct {
10
        OutputterFunc func() ([]byte, error)
11
}
12

13
func (sc TestShellCommand) Output() ([]byte, error) {
×
14
        return sc.OutputterFunc()
×
15
}
×
16

17
// ShellCommanderMaker is a commander generator that can return the provided
18
// stdout or stderr, and can also update a given variable with the generated
19
// command.
20
func ShellCommanderMaker(out *string, err error, generatedCommand *string) func(name string, arg ...string) command.IShellCommand {
×
21
        return func(name string, arg ...string) command.IShellCommand {
×
22
                if generatedCommand != nil {
×
23
                        fullCmd := name
×
24
                        for _, a := range arg {
×
25
                                // Add quotes when there are spaces.
×
26
                                if len(strings.Fields(a)) > 1 {
×
27
                                        a = "'" + a + "'"
×
28
                                }
×
29
                                fullCmd += " " + a
×
30
                        }
31
                        *generatedCommand = fullCmd
×
32
                }
33
                var stdout []byte
×
34
                if out != nil {
×
35
                        stdout = []byte(*out)
×
36
                }
×
37
                return TestShellCommand{
×
38
                        OutputterFunc: func() ([]byte, error) {
×
39
                                return stdout, err
×
40
                        },
×
41
                }
42
        }
43
}
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