Skip to content

Documentation: Examples after the first one are indented inappropriately #28178

@ratijas

Description

@ratijas

Issue Description

Look at the podman push -h output:

Push an image to a specified destination
[...]
Usage:
  podman push [options] IMAGE [DESTINATION]

Examples:
  podman push imageID docker://registry.example.com/repository:tag
                podman push imageID oci-archive:/path/to/layout:image:tag

Options:

Note how the second example is way off to the right. Source code:

Example: `podman push imageID docker://registry.example.com/repository:tag
podman push imageID oci-archive:/path/to/layout:image:tag`,

	// Command: podman push
	pushCmd = &cobra.Command{
		Use:               "push [options] IMAGE [DESTINATION]",
		// [...]
		Example: `podman push imageID docker://registry.example.com/repository:tag
		podman push imageID oci-archive:/path/to/layout:image:tag`,
	}

I suppose, the backticks string were meant to strip leading whitespaces, but they never actually behaved that way in Go?

This issue is present in many other commands, not just push!

Steps to reproduce the issue

Steps to reproduce the issue

  1. podman push -h

Describe the results you received

Second example is indented.

Describe the results you expected

Second example should not be indented.

podman info output

version:
  APIVersion: 5.5.2
  Built: 1754604929
  BuiltTime: Fri Aug  8 01:15:29 2025
  GitCommit: e7d8226745ba07a64b7176a7f128e4ef53225a0e
  GoVersion: go1.24.5
  Os: linux
  OsArch: linux/amd64
  Version: 5.5.2

Podman in a container

No

Privileged Or Rootless

Rootless

Upstream Latest Release

No

Additional environment details

No response

Additional information

No response

Metadata

Metadata

Assignees

Labels

Good First IssueThis issue would be a good issue for a first time contributor to undertake.documentationIssue or fix is in project documentationkind/bugCategorizes issue or PR as related to a bug.triagedIssue has been triagedvolunteers-wantedIssues good for community/volunteer contributions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions