Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix install command #1576

Merged
merged 1 commit into from Feb 17, 2022
Merged

Fix install command #1576

merged 1 commit into from Feb 17, 2022

Conversation

shyim
Copy link
Contributor

@shyim shyim commented Jan 9, 2022

the command didnt worked

❯ go install github.com/spf13/cobra/cobra
go install: version is required when current directory is not in a module
Try 'go install github.com/spf13/cobra/cobra@latest' to install the latest version

@CLAassistant
Copy link

CLAassistant commented Jan 9, 2022

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the area/cli [deprecated] For the cobra CLI !!! moved to spf13/cobra-cli label Jan 9, 2022
@umarcor umarcor mentioned this pull request Jan 28, 2022
jpmcb
jpmcb approved these changes Feb 17, 2022
Copy link
Collaborator

@jpmcb jpmcb left a comment

👍🏼

Verified in a new with go 1.16:

vagrant@ubuntu-focal:~$ go install github.com/spf13/cobra/cobra
go install: version is required when current directory is not in a module
        Try 'go install github.com/spf13/cobra/cobra@latest' to install the latest version

vagrant@ubuntu-focal:~$ go install github.com/spf13/cobra/cobra@latest
go: downloading github.com/spf13/cobra v1.3.0
go: downloading github.com/spf13/viper v1.10.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/mitchellh/mapstructure v1.4.3
go: downloading github.com/spf13/cast v1.4.1
go: downloading github.com/subosito/gotenv v1.2.0
go: downloading github.com/spf13/afero v1.6.0
go: downloading github.com/magiconair/properties v1.8.5
go: downloading github.com/fsnotify/fsnotify v1.5.1
go: downloading github.com/spf13/jwalterweatherman v1.1.0
go: downloading gopkg.in/ini.v1 v1.66.2
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/pelletier/go-toml v1.9.4
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading golang.org/x/sys v0.0.0-20211205182925-97ca703d548d
go: downloading golang.org/x/text v0.3.7

vagrant@ubuntu-focal:~$ ll go/bin/cobra
-rwxrwxr-x 1 vagrant vagrant 8476535 Feb 17 10:16 go/bin/cobra*

@jpmcb jpmcb merged commit a599632 into spf13:master Feb 17, 2022
2 checks passed
@marckhouzam marckhouzam added this to the 1.4.0 milestone Mar 10, 2022
gcf-merge-on-green bot pushed a commit to googleapis/gapic-showcase that referenced this issue Mar 10, 2022
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

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

---

### Release Notes

<details>
<summary>spf13/cobra</summary>

### [`v1.4.0`](https://togithub.com/spf13/cobra/releases/v1.4.0)

[Compare Source](https://togithub.com/spf13/cobra/compare/v1.3.0...v1.4.0)

### Winter 2022 Release ❄️

Another season, another release!

#### Goodbye viper! 🐍 🚀

The core Cobra library no longer requires Viper and all of it's indirect dependencies. This means that Cobra's dependency tree has been drastically thinned! The Viper dependency was included because of the the `cobra` CLI generation tool. [This tool has migrated to `spf13/cobra-cli`](https://togithub.com/spf13/cobra-cli/releases/tag/v1.3.0).

It's *pretty unlikely* you were importing and using **the bootstrapping CLI tool** as part of your application (after all, it's just a tool to get going with core `cobra`).

But if you were, replace occurrences of

    "github.com/spf13/cobra/cobra"

with

    "github.com/spf13/cobra-cli"

And in your `go.mod`, you'll want to also include this dependency:

    github.com/spf13/cobra-cli v1.3.0

Again, the maintainers *do not anticipate* this being a breaking change to users of the core `cobra` library, so minimal work should be required for users to integrate with this new release. Moreover, this means the dependency tree for your application using Cobra should no longer require dependencies that were inherited from Viper. Huzzah! 🥳

If you'd like to read more

-   issue: [spf13/cobra#1597
-   PR: [spf13/cobra#1604

#### Documentation 📝

-   Update Go Doc link and badge in README: [spf13/cobra#1593
-   Fix to install command, now targets `@latest`: [spf13/cobra#1576
-   Added MAINTAINERS file: [spf13/cobra#1545

#### Other 💭

-   Bumped license year to 2022 in golden files: [spf13/cobra#1575
-   Added Pixie to projects: [spf13/cobra#1581
-   Updated labeler for new labeling scheme: [spf13/cobra#1613 & syntax fix: [spf13/cobra#1624

Shoutout to our awesome contributors helping to make this cobra release possible!!
[@&#8203;spf13](https://togithub.com/spf13) [@&#8203;marckhouzam](https://togithub.com/marckhouzam) [@&#8203;johnSchnake](https://togithub.com/johnSchnake) [@&#8203;jpmcb](https://togithub.com/jpmcb) [@&#8203;liggitt](https://togithub.com/liggitt) [@&#8203;umarcor](https://togithub.com/umarcor) [@&#8203;hiljusti](https://togithub.com/hiljusti) [@&#8203;marians](https://togithub.com/marians) [@&#8203;shyim](https://togithub.com/shyim) [@&#8203;htroisi](https://togithub.com/htroisi)

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

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

 **Rebasing**: Whenever PR is behind base branch, 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, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/gapic-showcase).
aviator-app bot pushed a commit to airplanedev/cli that referenced this issue Mar 17, 2022
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/golang-jwt/jwt/v4](https://togithub.com/golang-jwt/jwt) | require | minor | `v4.3.0` -> `v4.4.0` |
| [github.com/google/uuid](https://togithub.com/google/uuid) | require | minor | `v1.2.0` -> `v1.3.0` |
| [github.com/spf13/cobra](https://togithub.com/spf13/cobra) | require | minor | `v1.3.0` -> `v1.4.0` |
| [github.com/stretchr/testify](https://togithub.com/stretchr/testify) | require | patch | `v1.7.0` -> `v1.7.1` |

---

### Release Notes

<details>
<summary>golang-jwt/jwt</summary>

### [`v4.4.0`](https://togithub.com/golang-jwt/jwt/releases/v4.4.0)

[Compare Source](https://togithub.com/golang-jwt/jwt/compare/v4.3.0...v4.4.0)

#### What's Changed

-   fix: expired token error message by [@&#8203;ydylla](https://togithub.com/ydylla) in [golang-jwt/jwt#165
-   feat: port clockskew support by [@&#8203;ksegun](https://togithub.com/ksegun) in [golang-jwt/jwt#139

#### New Contributors

-   [@&#8203;ydylla](https://togithub.com/ydylla) made their first contribution in [golang-jwt/jwt#165
-   [@&#8203;ksegun](https://togithub.com/ksegun) made their first contribution in [golang-jwt/jwt#139

**Full Changelog**: golang-jwt/jwt@v4.3.0...v4.4.0

</details>

<details>
<summary>google/uuid</summary>

### [`v1.3.0`](https://togithub.com/google/uuid/releases/v1.3.0)

[Compare Source](https://togithub.com/google/uuid/compare/v1.2.0...v1.3.0)

From Andrey Pechkurov:

Adds an optional randomness pool mode for Random (Version 4) UUID generation. The pool contains random bytes read from the random number generator on demand in batches. Enabling the pool may improve the UUID generation throughput significantly.

Since the pool is stored on the Go heap, this feature may be a bad fit for security sensitive applications. That's why it's implemented as an opt-in feature.

From Samuel Roth:

Added support for NullUUID

A NullUUID can be marked not valid (i.e., null) for use with JSON and the database/sql/driver.Scanner interfaces.

</details>

<details>
<summary>spf13/cobra</summary>

### [`v1.4.0`](https://togithub.com/spf13/cobra/releases/v1.4.0)

[Compare Source](https://togithub.com/spf13/cobra/compare/v1.3.0...v1.4.0)

### Winter 2022 Release ❄️

Another season, another release!

#### Goodbye viper! 🐍 🚀

The core Cobra library no longer requires Viper and all of its indirect dependencies. This means that Cobra's dependency tree has been drastically thinned! The Viper dependency was included because of the `cobra` CLI generation tool. [This tool has migrated to `spf13/cobra-cli`](https://togithub.com/spf13/cobra-cli/releases/tag/v1.3.0).

It's *pretty unlikely* you were importing and using **the bootstrapping CLI tool** as part of your application (after all, it's just a tool to get going with core `cobra`).

But if you were, replace occurrences of

    "github.com/spf13/cobra/cobra"

with

    "github.com/spf13/cobra-cli"

And in your `go.mod`, you'll want to also include this dependency:

    github.com/spf13/cobra-cli v1.3.0

Again, the maintainers *do not anticipate* this being a breaking change to users of the core `cobra` library, so minimal work should be required for users to integrate with this new release. Moreover, this means the dependency tree for your application using Cobra should no longer require dependencies that were inherited from Viper. Huzzah! 🥳

If you'd like to read more

-   issue: [spf13/cobra#1597
-   PR: [spf13/cobra#1604

#### Documentation 📝

-   Update Go Doc link and badge in README: [spf13/cobra#1593
-   Fix to install command, now targets `@latest`: [spf13/cobra#1576
-   Added MAINTAINERS file: [spf13/cobra#1545

#### Other 💭

-   Bumped license year to 2022 in golden files: [spf13/cobra#1575
-   Added Pixie to projects: [spf13/cobra#1581
-   Updated labeler for new labeling scheme: [spf13/cobra#1613 & syntax fix: [spf13/cobra#1624

Shoutout to our awesome contributors helping to make this cobra release possible!!
[@&#8203;spf13](https://togithub.com/spf13) [@&#8203;marckhouzam](https://togithub.com/marckhouzam) [@&#8203;johnSchnake](https://togithub.com/johnSchnake) [@&#8203;jpmcb](https://togithub.com/jpmcb) [@&#8203;liggitt](https://togithub.com/liggitt) [@&#8203;umarcor](https://togithub.com/umarcor) [@&#8203;hiljusti](https://togithub.com/hiljusti) [@&#8203;marians](https://togithub.com/marians) [@&#8203;shyim](https://togithub.com/shyim) [@&#8203;htroisi](https://togithub.com/htroisi)

</details>

<details>
<summary>stretchr/testify</summary>

### [`v1.7.1`](https://togithub.com/stretchr/testify/compare/v1.7.0...v1.7.1)

[Compare Source](https://togithub.com/stretchr/testify/compare/v1.7.0...v1.7.1)

</details>

---

### Configuration

📅 **Schedule**: "before 5am on Thursday" in timezone America/New_York.

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

 **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.
gcf-merge-on-green bot pushed a commit to GoogleCloudPlatform/alloydb-auth-proxy that referenced this issue May 18, 2022
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

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

---

### Release Notes

<details>
<summary>spf13/cobra</summary>

### [`v1.4.0`](https://togithub.com/spf13/cobra/releases/v1.4.0)

[Compare Source](https://togithub.com/spf13/cobra/compare/v1.3.0...v1.4.0)

### Winter 2022 Release ❄️

Another season, another release!

#### Goodbye viper! 🐍 🚀

The core Cobra library no longer requires Viper and all of its indirect dependencies. This means that Cobra's dependency tree has been drastically thinned! The Viper dependency was included because of the `cobra` CLI generation tool. [This tool has migrated to `spf13/cobra-cli`](https://togithub.com/spf13/cobra-cli/releases/tag/v1.3.0).

It's *pretty unlikely* you were importing and using **the bootstrapping CLI tool** as part of your application (after all, it's just a tool to get going with core `cobra`).

But if you were, replace occurrences of

    "github.com/spf13/cobra/cobra"

with

    "github.com/spf13/cobra-cli"

And in your `go.mod`, you'll want to also include this dependency:

    github.com/spf13/cobra-cli v1.3.0

Again, the maintainers *do not anticipate* this being a breaking change to users of the core `cobra` library, so minimal work should be required for users to integrate with this new release. Moreover, this means the dependency tree for your application using Cobra should no longer require dependencies that were inherited from Viper. Huzzah! 🥳

If you'd like to read more

-   issue: [spf13/cobra#1597
-   PR: [spf13/cobra#1604

#### Documentation 📝

-   Update Go Doc link and badge in README: [spf13/cobra#1593
-   Fix to install command, now targets `@latest`: [spf13/cobra#1576
-   Added MAINTAINERS file: [spf13/cobra#1545

#### Other 💭

-   Bumped license year to 2022 in golden files: [spf13/cobra#1575
-   Added Pixie to projects: [spf13/cobra#1581
-   Updated labeler for new labeling scheme: [spf13/cobra#1613 & syntax fix: [spf13/cobra#1624

Shoutout to our awesome contributors helping to make this cobra release possible!!
[@&#8203;spf13](https://togithub.com/spf13) [@&#8203;marckhouzam](https://togithub.com/marckhouzam) [@&#8203;johnSchnake](https://togithub.com/johnSchnake) [@&#8203;jpmcb](https://togithub.com/jpmcb) [@&#8203;liggitt](https://togithub.com/liggitt) [@&#8203;umarcor](https://togithub.com/umarcor) [@&#8203;hiljusti](https://togithub.com/hiljusti) [@&#8203;marians](https://togithub.com/marians) [@&#8203;shyim](https://togithub.com/shyim) [@&#8203;htroisi](https://togithub.com/htroisi)

### [`v1.3.0`](https://togithub.com/spf13/cobra/releases/v1.3.0)

[Compare Source](https://togithub.com/spf13/cobra/compare/v1.2.1...v1.3.0)

### v1.3.0 - The Fall 2021 release 🍁

#### Completion fixes & enhancements 💇🏼

In `v1.2.0`, we introduced a new model for completions. Thanks to everyone for trying it, giving feedback, and providing numerous fixes! Continue to work with the new model as the old one (as noted in code comments) will be deprecated in a coming release.

-   `DisableFlagParsing` now triggers custom completions for flag names [#&#8203;1161](https://togithub.com/spf13/cobra/issues/1161)
-   Fixed unbound variables in bash completions causing edge case errors [#&#8203;1321](https://togithub.com/spf13/cobra/issues/1321)
-   `help` completion formatting improvements & fixes [#&#8203;1444](https://togithub.com/spf13/cobra/issues/1444)
-   All completions now follow the `help` example: short desc are now capitalized and removes extra spacing from long description [#&#8203;1455](https://togithub.com/spf13/cobra/issues/1455)
-   Typo fixes in bash & zsh completions [#&#8203;1459](https://togithub.com/spf13/cobra/issues/1459)
-   Fixed mixed tab/spaces indentation in completion scripts. Now just 4 spaces [#&#8203;1473](https://togithub.com/spf13/cobra/issues/1473)
-   Support for different bash completion options. Bash completions v2 supports descriptions and requires descriptions to be removed for `menu-complete`, `menu-complete-backward` and `insert-completions`. These descriptions are now purposefully removed in support of this model. [#&#8203;1509](https://togithub.com/spf13/cobra/issues/1509)
-   Fix for invalid shell completions when using `~/.cobra.yaml`. Log message `Using config file: ~/.cobra.yaml` now printed to stderr [#&#8203;1510](https://togithub.com/spf13/cobra/issues/1510)
-   Removes unnecessary trailing spaces from completion command descriptions [#&#8203;1520](https://togithub.com/spf13/cobra/issues/1520)
-   Option to hide default `completion` command [#&#8203;1541](https://togithub.com/spf13/cobra/issues/1541)
-   Remove `__complete` command for programs without subcommands [#&#8203;1563](https://togithub.com/spf13/cobra/issues/1563)

#### Generator changes ⚙️

Thanks to [@&#8203;spf13](https://togithub.com/spf13) for providing a number of changes to the Cobra generator tool, streamlining it for new users!

-   The Cobra generator now *won't* automatically include Viper and cleans up a number of unused imports when not using Viper.
-   The Cobra generator's default license is now `none`
-   The Cobra generator now works with Go modules
-   Documentation to reflect these changes

#### New Features 

-   License can be specified by their SPDX identifiers [#&#8203;1159](https://togithub.com/spf13/cobra/issues/1159)
-   `MatchAll` allows combining several PositionalArgs to work in concert. This now allows for enabling composing `PositionalArgs` [#&#8203;896](https://togithub.com/spf13/cobra/issues/896)

#### Bug Fixes 🐛

-   Fixed multiple error message from cobra `init` boilerplates [#&#8203;1463](https://togithub.com/spf13/cobra/issues/1463) [#&#8203;1552](https://togithub.com/spf13/cobra/issues/1552) [#&#8203;1557](https://togithub.com/spf13/cobra/issues/1557)

#### Testing 👀

-   Now testing golang 1.16.x and 1.17.x in CI [#&#8203;1425](https://togithub.com/spf13/cobra/issues/1425)
-   Fix for running diff test to ignore CR for windows [#&#8203;949](https://togithub.com/spf13/cobra/issues/949)
-   Added helper functions and reduced code reproduction in `args_test` [#&#8203;1426](https://togithub.com/spf13/cobra/issues/1426)
-   Now using official `golangci-lint` github action [#&#8203;1477](https://togithub.com/spf13/cobra/issues/1477)

#### Security 🔏

-   Added GitHub dependabot [#&#8203;1427](https://togithub.com/spf13/cobra/issues/1427)
-   Now using Viper `v1.10.0`
    -   There is a known CVE in an *indirect* dependency from `viper`: [spf13/cobra#1538. This will be patched in a future release

#### Documentation 📝

-   Multiple projects added to the `projects_using_cobra.md` file: [#&#8203;1377](https://togithub.com/spf13/cobra/issues/1377) [#&#8203;1501](https://togithub.com/spf13/cobra/issues/1501) [#&#8203;1454](https://togithub.com/spf13/cobra/issues/1454)
-   Removed ToC from main readme file as it is now automagically displayed by GitHub [#&#8203;1429](https://togithub.com/spf13/cobra/issues/1429)
-   Documentation correct for when the `--author` flag is specified [#&#8203;1009](https://togithub.com/spf13/cobra/issues/1009)
-   `shell_completions.md` has an easier to use snippet for copying and pasting shell completions [#&#8203;1372](https://togithub.com/spf13/cobra/issues/1372)

#### Other 💭

-   Bump version of  `cpuguy83/go-md2man` to v2.0.1 [#&#8203;1460](https://togithub.com/spf13/cobra/issues/1460)
-   Removed `lesser` typo from the GPL-2.0 license [#&#8203;880](https://togithub.com/spf13/cobra/issues/880)
-   Fixed spelling errors [#&#8203;1514](https://togithub.com/spf13/cobra/issues/1514)

*Thank you to all our amazing contributors* 🐍🚀

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

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

 **Rebasing**: Whenever PR is behind base branch, 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, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/GoogleCloudPlatform/alloydb-auth-proxy).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli [deprecated] For the cobra CLI !!! moved to spf13/cobra-cli
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants