-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
area/apiRelates to Docker API docsRelates to Docker API docsarea/engineIssue affects Docker engine/daemonIssue affects Docker engine/daemonlifecycle/locked
Description
Is this a docs issue?
- My issue is about the documentation content or website
Type of issue
Information is incorrect
Description
Code :
package main
import (
"context"
"io"
"os"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
)
func main() {
ctx := context.Background()
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
if err != nil {
panic(err)
}
defer cli.Close()
options := types.ContainerLogsOptions{ShowStdout: true}
//Container ID
out, err := cli.ContainerLogs(ctx, "7d68611840b8", options)
if err != nil {
panic(err)
}
io.Copy(os.Stdout, out)
}
Error :
.\main.go:20:19: undefined: types.ContainerLogsOptions
Location
https://docs.docker.com/engine/api/sdk/examples/
Suggestion
No response
Metadata
Metadata
Assignees
Labels
area/apiRelates to Docker API docsRelates to Docker API docsarea/engineIssue affects Docker engine/daemonIssue affects Docker engine/daemonlifecycle/locked