(cmd *cobra.Command, args []string)
| 174 | } |
| 175 | |
| 176 | func runGet(cmd *cobra.Command, args []string) error { |
| 177 | if err := cli.RequirePackage(cmd); err != nil { |
| 178 | return err |
| 179 | } |
| 180 | |
| 181 | client, err := api.NewClient(cli.GetPackageName(), 60*time.Second) |
| 182 | if err != nil { |
| 183 | return err |
| 184 | } |
| 185 | |
| 186 | edit, err := client.CreateEdit() |
| 187 | if err != nil { |
| 188 | return err |
| 189 | } |
| 190 | defer edit.Close() |
| 191 | defer func() { |
| 192 | _ = edit.Delete() |
| 193 | }() |
| 194 | |
| 195 | track, err := edit.Tracks().Get(client.GetPackageName(), edit.ID(), trackName).Context(edit.Context()).Do() |
| 196 | if err != nil { |
| 197 | return err |
| 198 | } |
| 199 | |
| 200 | return output.Print(track) |
| 201 | } |
| 202 | |
| 203 | func runUpdate(cmd *cobra.Command, args []string) error { |
| 204 | if err := cli.RequirePackage(cmd); err != nil { |
nothing calls this directly
no test coverage detected