python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Differentiate between required and optional flags in help message in Cobra
I have created a command as follows:
cmd := &cobra.Command{
Use: "get",
Short: "Gets information",
Long: heredoc.Doc("Long description"),
...
tortuga
Votes: 0
Answers: 0
Link another Golang Cobra CLI to current Golang Cobra CLI
I am working on a new Golang Cobra CLI, which handles several commands. I later on found out that there is already an existing Golang Cobra CLI that handles some commands that I will be covering in th...
jtee
Votes: 0
Answers: 1
What does this command do 'GOFLAGS=-mod=mod'?
I am trying to make a Taskfile.yml file for building go application, but I can't quite understand the need of "GOFLAGS=-mod=mod" command before go build main.go.
reference: https://dev.to/au...
Harshit Kumar
Votes: 0
Answers: 1
Why is Cobra flags not working in this code
How to get flags to work in Cobra using Local flags
package main
import (
"fmt"
"github.com/spf13/cobra"
)
func main() {
myCmd := &cobra.Command{
Use: &qu...
Chris G.
Votes: 0
Answers: 1