Skip to content

Conversation

nirs
Copy link
Contributor

@nirs nirs commented Aug 24, 2024

nirs added 3 commits August 24, 2024 22:54
- Separate titles with blank lines
- Separate code blocks with blank lines
- Always use ``` blocks for examples
- Use console for console (bash syntax highlighting does work well with
  example command output)
- Start console examples with $ (highlight command and output
  differently and more friendly to other shells users)
When we want to show a minimal example with single import it looks
cleaner and more minimal with a single line.
your.go
commands.go
here.go
main.go
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if main.go is indented correctly. We can replace it with tree output which is much more clear to users and also used later below.

appName
├── cmd
│   ├── add.go
│   ├── your.go
│   ├── commands.go
│   └── here.go
└── main.go

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, feel free to change this if you prefer.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In a follow-up 😄

@nirs nirs changed the title Site formatting Improve site formatting Aug 24, 2024
Copy link
Collaborator

@marckhouzam marckhouzam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!
Thanks!

@marckhouzam marckhouzam merged commit ff7c561 into spf13:main Oct 12, 2024
18 checks passed
@marckhouzam marckhouzam added this to the 1.9.0 milestone Oct 12, 2024
@marckhouzam marckhouzam modified the milestones: 1.8.1, 1.9.0 Nov 4, 2024
ayax79 pushed a commit to ayax79/cobra that referenced this pull request Nov 28, 2024
* Improve site formatting

- Separate titles with blank lines
- Separate code blocks with blank lines
- Always use ``` blocks for examples
- Use console for console (bash syntax highlighting does work well with
  example command output)
- Start console examples with $ (highlight command and output
  differently and more friendly to other shells users)

* Unify indentation in example project structure

* Use single import line in the trivial examples

When we want to show a minimal example with single import it looks
cleaner and more minimal with a single line.
Crown0815 pushed a commit to Crown0815/forgejo-runner-windows that referenced this pull request May 21, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/spf13/cobra](https://github.com/spf13/cobra) | require | minor | `v1.8.1` -> `v1.9.1` |

---

### Release Notes

<details>
<summary>spf13/cobra (github.com/spf13/cobra)</summary>

### [`v1.9.1`](https://github.com/spf13/cobra/releases/tag/v1.9.1)

[Compare Source](spf13/cobra@v1.9.0...v1.9.1)

##### 🐛 Fixes

-   Fix CompletionFunc implementation by [@&#8203;ccoVeille](https://github.com/ccoVeille) in spf13/cobra#2234
-   Revert "Make detection for test-binary more universal ([#&#8203;2173](spf13/cobra#2173))" by [@&#8203;marckhouzam](https://github.com/marckhouzam) in spf13/cobra#2235

**Full Changelog**: spf13/cobra@v1.9.0...v1.9.1

### [`v1.9.0`](https://github.com/spf13/cobra/releases/tag/v1.9.0)

[Compare Source](spf13/cobra@v1.8.1...v1.9.0)

#### ✨ Features

-   Allow linker to perform deadcode elimination for program using Cobra by [@&#8203;aarzilli](https://github.com/aarzilli) in spf13/cobra#1956
-   Add default completion command even if there are no other sub-commands by [@&#8203;marckhouzam](https://github.com/marckhouzam) in spf13/cobra#1559
-   Add CompletionWithDesc helper by [@&#8203;ccoVeille](https://github.com/ccoVeille) in spf13/cobra#2231

#### 🐛 Fixes

-   Fix deprecation comment for Command.SetOutput by [@&#8203;thaJeztah](https://github.com/thaJeztah) in spf13/cobra#2172
-   Replace deprecated ioutil usage by [@&#8203;nirs](https://github.com/nirs) in spf13/cobra#2181
-   Fix --version help and output for plugins by [@&#8203;nirs](https://github.com/nirs) in spf13/cobra#2180
-   Allow to reset the templates to the default by [@&#8203;marckhouzam](https://github.com/marckhouzam) in spf13/cobra#2229

#### 🤖 Completions

-   Make Powershell completion work in constrained mode by [@&#8203;lstemplinger](https://github.com/lstemplinger) in spf13/cobra#2196
-   Improve detection for flags that accept multiple values by [@&#8203;thaJeztah](https://github.com/thaJeztah) in spf13/cobra#2210
-   add CompletionFunc type to help with completions by [@&#8203;ccoVeille](https://github.com/ccoVeille) in spf13/cobra#2220
-   Add similar whitespace escape logic to bash v2 completions than in other completions by [@&#8203;kangasta](https://github.com/kangasta) in spf13/cobra#1743
-   Print ActiveHelp for bash along other completions by [@&#8203;marckhouzam](https://github.com/marckhouzam) in spf13/cobra#2076
-   fix(completions): Complete map flags multiple times by [@&#8203;gabe565](https://github.com/gabe565) in spf13/cobra#2174
-   fix(bash): nounset unbound file filter variable on empty extension by [@&#8203;scop](https://github.com/scop) in spf13/cobra#2228

#### 🧪 Testing

-   Test also with go 1.23 by [@&#8203;nirs](https://github.com/nirs) in spf13/cobra#2182
-   Make detection for test-binary more universal by [@&#8203;thaJeztah](https://github.com/thaJeztah) in spf13/cobra#2173

#### ✍🏼 Documentation

-   docs: update README.md by [@&#8203;eltociear](https://github.com/eltociear) in spf13/cobra#2197
-   Improve site formatting by [@&#8203;nirs](https://github.com/nirs) in spf13/cobra#2183
-   doc: add Conduit by [@&#8203;raulb](https://github.com/raulb) in spf13/cobra#2230
-   doc: azion project added to the list of CLIs that use cobra by [@&#8203;maxwelbm](https://github.com/maxwelbm) in spf13/cobra#2198
-   Fix broken links in active_help.md by [@&#8203;vuil](https://github.com/vuil) in spf13/cobra#2202
-   chore: fix function name in comment by [@&#8203;zhuhaicity](https://github.com/zhuhaicity) in spf13/cobra#2216

#### 🔧 Dependency upgrades

-   build(deps): bump github.com/cpuguy83/go-md2man/v2 from 2.0.5 to 2.0.6 by [@&#8203;thaJeztah](https://github.com/thaJeztah) in spf13/cobra#2206
-   Update to latest go-md2man by [@&#8203;mikelolasagasti](https://github.com/mikelolasagasti) in spf13/cobra#2201
-   Upgrade `pflag` dependencies for v1.9.0 by [@&#8203;jpmcb](https://github.com/jpmcb) in spf13/cobra#2233

***

Thank you to all of our amazing contributors and all the great work that's been going into the completions feature!!

##### 👋🏼 New Contributors

-   [@&#8203;gabe565](https://github.com/gabe565) made their first contribution in spf13/cobra#2174
-   [@&#8203;maxwelbm](https://github.com/maxwelbm) made their first contribution in spf13/cobra#2198
-   [@&#8203;lstemplinger](https://github.com/lstemplinger) made their first contribution in spf13/cobra#2196
-   [@&#8203;vuil](https://github.com/vuil) made their first contribution in spf13/cobra#2202
-   [@&#8203;mikelolasagasti](https://github.com/mikelolasagasti) made their first contribution in spf13/cobra#2201
-   [@&#8203;zhuhaicity](https://github.com/zhuhaicity) made their first contribution in spf13/cobra#2216
-   [@&#8203;ccoVeille](https://github.com/ccoVeille) made their first contribution in spf13/cobra#2220
-   [@&#8203;kangasta](https://github.com/kangasta) made their first contribution in spf13/cobra#1743
-   [@&#8203;aarzilli](https://github.com/aarzilli) made their first contribution in spf13/cobra#1956

**Full Changelog**: spf13/cobra@v1.8.1...v1.9.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC4wLjgiLCJ1cGRhdGVkSW5WZXIiOiI0MC4wLjgiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/557
Reviewed-by: earl-warren <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants