package cmd
import (
"fmt"
"github.com/spf13/cobra"
"gitlab.com/pcanilho/go-jira-cli/cmd/errors"
)
var userGetCmd = &cobra.Command{
Use: "get",
Short: "Find a Jira user based on the provided username",
RunE: func(cmd *cobra.Command, args []string) error {
if len(args) == 0 {
return fmt.Errorf("please specify a username")
}
user, err := jiraController.GetUser(args[0])
if err != nil {
return errors.NewCliError(err)
}
// Set output
output, outputExpanded = user.Key, user
return nil
},
}
|
The pages are generated with Golds v0.3.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |