diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2019-08-05 16:53:46 +0200 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2019-09-18 12:56:58 +0200 |
commit | a0d58b22483e7d1638e459514dac4b34105ba9f7 (patch) | |
tree | 7f52afd75c5c0bddff11f6b2f28aaa6d1c2e8866 /integration-cli/docker_cli_save_load_test.go | |
parent | fdc1b22030f2a04931fb0005f34020109b0562b8 (diff) | |
download | docker-a0d58b22483e7d1638e459514dac4b34105ba9f7.tar.gz |
integration-cli: use raw strings for regexes (gosimple)
```
14:26:43 integration-cli/docker_cli_build_test.go:3430:15: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (gosimple)
14:26:43 outRegexp := regexp.MustCompile("^(sha256:|)[a-z0-9]{64}\\n$")
14:26:43 ^
14:26:43 integration-cli/docker_cli_by_digest_test.go:26:20: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (gosimple)
14:26:43 pushDigestRegex = regexp.MustCompile("[\\S]+: digest: ([\\S]+) size: [0-9]+")
14:26:43 ^
14:26:43 integration-cli/docker_cli_by_digest_test.go:27:20: S1007: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (gosimple)
14:26:43 digestRegex = regexp.MustCompile("Digest: ([\\S]+)")
```
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'integration-cli/docker_cli_save_load_test.go')
-rw-r--r-- | integration-cli/docker_cli_save_load_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/integration-cli/docker_cli_save_load_test.go b/integration-cli/docker_cli_save_load_test.go index 70549525ef..59da3fec00 100644 --- a/integration-cli/docker_cli_save_load_test.go +++ b/integration-cli/docker_cli_save_load_test.go @@ -236,7 +236,7 @@ func (s *DockerSuite) TestSaveRepoWithMultipleImages(c *testing.T) { lines := strings.Split(strings.TrimSpace(out), "\n") var actual []string for _, l := range lines { - if regexp.MustCompile("^[a-f0-9]{64}\\.json$").Match([]byte(l)) { + if regexp.MustCompile(`^[a-f0-9]{64}\.json$`).Match([]byte(l)) { actual = append(actual, strings.TrimSuffix(l, ".json")) } } |