Skip to content

Commit 5f5a7b0

Browse files
committed
fix: make LogConfig type unexported
Signed-off-by: Ruihua Wen <[email protected]>
1 parent 294fe15 commit 5f5a7b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/cmd/container/logs.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func Logs(ctx context.Context, client *containerd.Client, container string, opti
108108
detailPrefix := ""
109109
if options.Details {
110110
if logConfigJSON, ok := l["nerdctl/log-config"]; ok {
111-
type LogConfig struct {
111+
type logConfig struct {
112112
Opts map[string]string `json:"opts"`
113113
}
114114

@@ -117,11 +117,11 @@ func Logs(ctx context.Context, client *containerd.Client, container string, opti
117117
return err
118118
}
119119

120-
var logConfig LogConfig
120+
var logCfg logConfig
121121
var optPairs []string
122122

123-
if err := json.Unmarshal([]byte(logConfigJSON), &logConfig); err == nil {
124-
envOpts, labelOpts := getLogOpts(logConfig.Opts)
123+
if err := json.Unmarshal([]byte(logConfigJSON), &logCfg); err == nil {
124+
envOpts, labelOpts := getLogOpts(logCfg.Opts)
125125

126126
for _, v := range envOpts {
127127
if env, ok := e[v]; ok {

0 commit comments

Comments
 (0)