Elimneted magic string

Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
This commit is contained in:
keitosuwahara 2025-07-27 16:35:25 +09:00 committed by Nicolas De loof
parent fe046915eb
commit a926f7d717

View File

@ -33,6 +33,7 @@ import (
const (
TransformerLabel = "com.docker.compose.bridge"
DefaultTransformerImage = "docker/compose-bridge-kubernetes"
templatesPath = "/templates"
)
type CreateTransformerOptions struct {
@ -73,7 +74,7 @@ func CreateTransformer(ctx context.Context, dockerCli command.Cli, options Creat
if err != nil {
return err
}
content, stat, err := dockerCli.Client().CopyFromContainer(ctx, created.ID, "/templates")
content, stat, err := dockerCli.Client().CopyFromContainer(ctx, created.ID, templatesPath)
if err != nil {
return err
}
@ -82,7 +83,7 @@ func CreateTransformer(ctx context.Context, dockerCli command.Cli, options Creat
}()
srcInfo := archive.CopyInfo{
Path: "/templates",
Path: templatesPath,
Exists: true,
IsDir: stat.Mode.IsDir(),
}