Skip to content

Commit

Permalink
simplify #-char removal with Trim command
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasticrabbit committed Nov 8, 2021
1 parent 56d0c71 commit 89eca13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ var taskCmd = &cobra.Command{
fmt.Fprintln(os.Stderr, "Incorrect arguments, usage: clickup get task 123456")
}

taskID := strings.Replace(strings.Join(args, ","), "#", "", -1)
//taskID := strings.Replace(strings.Join(args, ","), "#", "", -1)
taskID := strings.Trim(args[0], "#")

if !fileFlag {
fmt.Println(string(internal.GetTask(taskID, token, clientID)))
Expand Down

0 comments on commit 89eca13

Please sign in to comment.