using raw string literal
regular expressions have their own escape sequences, raw strings can improve their readability. Signed-off-by: Tomohiro Kusumoto <zabio1192@gmail.com>docker-19.03
parent
a61393a5bc
commit
be2691d06c
|
@ -50,8 +50,8 @@ const (
|
|||
keyContextSubDir = "contextsubdir"
|
||||
)
|
||||
|
||||
var httpPrefix = regexp.MustCompile("^https?://")
|
||||
var gitUrlPathWithFragmentSuffix = regexp.MustCompile("\\.git(?:#.+)?$")
|
||||
var httpPrefix = regexp.MustCompile(`^https?://`)
|
||||
var gitUrlPathWithFragmentSuffix = regexp.MustCompile(`\.git(?:#.+)?$`)
|
||||
|
||||
func Build(ctx context.Context, c client.Client) (*client.Result, error) {
|
||||
opts := c.BuildOpts().Opts
|
||||
|
|
|
@ -79,7 +79,7 @@ http:
|
|||
}
|
||||
|
||||
func detectPort(ctx context.Context, rc io.ReadCloser) (string, error) {
|
||||
r := regexp.MustCompile("listening on 127\\.0\\.0\\.1:(\\d+)")
|
||||
r := regexp.MustCompile(`listening on 127\.0\.0\.1:(\d+)`)
|
||||
s := bufio.NewScanner(rc)
|
||||
found := make(chan struct{})
|
||||
defer func() {
|
||||
|
|
Loading…
Reference in New Issue