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

wrouesnel / p2cli / 13113960990

03 Feb 2025 12:55PM UTC coverage: 34.911%. Remained the same
13113960990

Pull #72

github

web-flow
Bump github.com/samber/lo from 1.47.0 to 1.49.1

Bumps [github.com/samber/lo](https://github.com/samber/lo) from 1.47.0 to 1.49.1.
- [Release notes](https://github.com/samber/lo/releases)
- [Commits](https://github.com/samber/lo/compare/v1.47.0...v1.49.1)

---
updated-dependencies:
- dependency-name: github.com/samber/lo
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #72: Bump github.com/samber/lo from 1.47.0 to 1.49.1

332 of 951 relevant lines covered (34.91%)

25.43 hits per line

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

72.22
/pkg/envutil/inputprocessors.go
1
package envutil
2

3
import (
4
        "os"
5
        "strings"
6

7
        "github.com/wrouesnel/p2cli/pkg/errdefs"
8
)
9

10
// FromEnvironment consumes the environment and outputs a valid input data field into the
11
// supplied map.
12
func FromEnvironment(env []string) (map[string]string, error) {
2✔
13
        results := map[string]string{}
2✔
14

2✔
15
        if env == nil {
3✔
16
                env = os.Environ()
1✔
17
        }
1✔
18

19
        const expectedArgs = 2
2✔
20

2✔
21
        for _, keyval := range env {
127✔
22
                splitKeyVal := strings.SplitN(keyval, "=", expectedArgs)
125✔
23
                if len(splitKeyVal) != expectedArgs {
125✔
24
                        return results, error(errdefs.EnvironmentVariablesError{
×
25
                                Reason:    "Could not find an equals value to split on",
×
26
                                RawEnvVar: keyval,
×
27
                        })
×
28
                }
×
29
                results[splitKeyVal[0]] = splitKeyVal[1]
125✔
30
        }
31

32
        return results, nil
2✔
33
}
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