code: func NewLogsCommand(dockerCli command.Cli) *cobra.Command {
  	var opts logsOptions
  
  	cmd := &cobra.Command{
  		Use:   "logs [OPTIONS] CONTAINER",
  		Short: "Fetch the logs of a container",
  		Args:  cli.ExactArgs(1),
  		RunE: func(cmd *cobra.Command, args []string) error {
  			opts.container = args[0]
  			return runLogs(dockerCli, &opts)
  		},
  	}
  
  	flags := cmd.Flags()
  	flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output")
  	flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)")
  	flags.StringVar(&opts.until, "until", "", "Show logs before a timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes)")
  	flags.SetAnnotation("until", "version", []string{"1.35"})
  	flags.BoolVarP(&opts.timestamps, "timestamps", "t", false, "Show timestamps")
  	flags.BoolVar(&opts.details, "details", false, "Show extra details provided to logs")
  	flags.StringVar(&opts.tail, "tail", "all", "Number of lines to show from the end of the logs")
  	return cmd
  }
docs: // NewLogsCommand creates a new cobra.Command for `docker logs`