Title: Bug: Listing parameters when you have 0 panics, index out of bounds · Issue #491 · coder/coder · GitHub
Open Graph Title: Bug: Listing parameters when you have 0 panics, index out of bounds · Issue #491 · coder/coder
X Title: Bug: Listing parameters when you have 0 panics, index out of bounds · Issue #491 · coder/coder
Description: Summary When you do parameters list with 0 parameters, you get a panic. $ ./coder parameters list panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: github.com/coder/coder/cli.parameterList.func1(0xc000259b...
Open Graph Description: Summary When you do parameters list with 0 parameters, you get a panic. $ ./coder parameters list panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: github.com/coder/...
X Description: Summary When you do parameters list with 0 parameters, you get a panic. $ ./coder parameters list panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: github.com/coder/...
Opengraph URL: https://github.com/coder/coder/issues/491
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Bug: Listing parameters when you have 0 panics, index out of bounds","articleBody":"# Summary\r\n\r\nWhen you do `parameters list` with 0 parameters, you get a panic.\r\n\r\n```\r\n$ ./coder parameters list\r\npanic: runtime error: index out of range [0] with length 0\r\n\r\ngoroutine 1 [running]:\r\ngithub.com/coder/coder/cli.parameterList.func1(0xc000259b80, {0xecfa7f0, 0x0, 0x0})\r\n\t/home/runner/work/coder/coder/cli/parameterlist.go:28 +0x6e5\r\ngithub.com/spf13/cobra.(*Command).execute(0xc000259b80, {0xecfa7f0, 0x0, 0x0})\r\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:856 +0x60e\r\ngithub.com/spf13/cobra.(*Command).ExecuteC(0xc00013ea00)\r\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:974 +0x3bc\r\ngithub.com/spf13/cobra.(*Command).Execute(...)\r\n\t/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.4.0/command.go:902\r\nmain.main()\r\n\t/home/runner/work/coder/coder/cmd/coder/main.go:10 +0x1e\r\nsteven ~/Downloads/example $ \r\n```\r\n\r\n# Current Behavior (steps to reproduce)\r\n\r\nA index out of bounds panic.\r\n\r\n1. Start a new dev server `./coder start --dev`\r\n2. List params `./coder parameters list`\r\n\r\n# Desired Behavior\r\n\r\nReturn an empty list\r\n","author":{"url":"https://github.com/Emyrk","@type":"Person","name":"Emyrk"},"datePublished":"2022-03-18T19:48:03Z","url":"https://github.com/coder/coder/issues/491"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ebf5cb2c-cc76-7f48-31e1-df95ee93828d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 94D8:E9D16:1C85BBE:24223DB:6B0192EC |
| html-safe-nonce | 53c1ebfbaf1ed8fedd3391227de27bc69bdbfed828fb5e16f0c76d1306e6e24e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEQ4OkU5RDE2OjFDODVCQkU6MjQyMjNEQjo2QjAxOTJFQyIsInZpc2l0b3JfaWQiOiI4MjMzMDIzNDU1NzQyNzU5NjYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 318bc98ce114586a0555566dac0f901d5aa8a992d155b94368f9b6610d2c8e36 |
| hovercard-subject-tag | issue:1173967645 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/491/issue_layout |
| twitter:image | https://opengraph.githubassets.com/82b3a201dee79e69b660ee3e0f8c871f7168b9f242c73d0c1cf1841c3f0c60e1/coder/coder/issues/491 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/82b3a201dee79e69b660ee3e0f8c871f7168b9f242c73d0c1cf1841c3f0c60e1/coder/coder/issues/491 |
| og:image:alt | Summary When you do parameters list with 0 parameters, you get a panic. $ ./coder parameters list panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: github.com/coder/... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Emyrk |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width