This cleans up `root.go` a bit, adds tests for middleware HTTP transport
functions, and removes two HTTP requests we always always performed previously
when executing *any* client command.
It should improve CLI performance (especially for users with higher latency).
* Detects the following pattern where the CLI is initialized with a client authenticated as the "first user":
client := coderdtest.New(t, ...)
[...]
user := coderdtest.CreateFirstUser(t, client)
[...]
clitest.SetupConfig(t, client, root)
* Updates documentation regarding role permissions on workspaces.
* chore: add /v2 to import module path
go mod requires semantic versioning with versions greater than 1.x
This was a mechanical update by running:
```
go install github.com/marwan-at-work/mod/cmd/mod@latest
mod upgrade
```
Migrate generated files to import /v2
* Fix gen
* Improve CLI logout flow
* Fix lint error
* Make notLoggedInMessage a const
* successful logout with a msg when cfg files are absent
* use require, os.remove, show only one message, add prompt
* add helper text to unauthorized error messages
* fix lint error, add unit tests
* fix test name
* fix test name
* fix lint errors in test
* add unauthorized test for templates create
* remove unnecessary variable
* remove Error struct, change error message
* change [url] to <url>