Skip to content

Commit f651edc

Browse files
committed
fmt
1 parent 08bffe2 commit f651edc

File tree

3 files changed

+33
-35
lines changed

3 files changed

+33
-35
lines changed

coderd/dynamicparameters/render.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ type Renderer interface {
3131
Close()
3232
}
3333

34-
var (
35-
ErrorTemplateVersionNotReady = xerrors.New("template version job not finished")
36-
)
34+
var ErrorTemplateVersionNotReady = xerrors.New("template version job not finished")
3735

3836
// Loader is used to load the necessary coder objects for rendering a template
3937
// version's parameters. The output is a Renderer, which is the object that uses

enterprise/coderd/dynamicparameters_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func TestDynamicParameterTemplate(t *testing.T) {
5252
StaticParams: nil,
5353
})
5454

55-
var _ = userAdmin
55+
_ = userAdmin
5656

5757
ctx := testutil.Context(t, testutil.WaitLong)
5858

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
terraform {
22
required_providers {
33
coder = {
4-
source = "coder/coder"
4+
source = "coder/coder"
55
version = "2.5.3"
66
}
77
}
@@ -14,29 +14,29 @@ locals {
1414
}
1515

1616
data "coder_parameter" "isAdmin" {
17-
name = "isAdmin"
18-
type = "bool"
19-
form_type = "switch"
20-
default = local.isAdmin
21-
order = 1
17+
name = "isAdmin"
18+
type = "bool"
19+
form_type = "switch"
20+
default = local.isAdmin
21+
order = 1
2222
}
2323

2424
data "coder_parameter" "adminonly" {
25-
count = local.isAdmin ? 1 : 0
26-
name = "adminonly"
25+
count = local.isAdmin ? 1 : 0
26+
name = "adminonly"
2727
form_type = "input"
2828
type = "string"
2929
default = "I am an admin!"
30-
order = 2
30+
order = 2
3131
}
3232

3333

3434
data "coder_parameter" "groups" {
35-
name = "groups"
36-
type = "list(string)"
37-
form_type = "multi-select"
38-
default = jsonencode([data.coder_workspace_owner.me.groups[0]])
39-
order = 50
35+
name = "groups"
36+
type = "list(string)"
37+
form_type = "multi-select"
38+
default = jsonencode([data.coder_workspace_owner.me.groups[0]])
39+
order = 50
4040

4141
dynamic "option" {
4242
for_each = data.coder_workspace_owner.me.groups
@@ -49,17 +49,17 @@ data "coder_parameter" "groups" {
4949

5050
locals {
5151
colors = {
52-
"red": ["apple", "ruby"]
53-
"yellow": ["banana"]
54-
"blue": ["ocean", "sky"]
52+
"red" : ["apple", "ruby"]
53+
"yellow" : ["banana"]
54+
"blue" : ["ocean", "sky"]
5555
}
5656
}
5757

5858
data "coder_parameter" "colors" {
59-
name = "colors"
60-
type = "list(string)"
61-
form_type = "multi-select"
62-
order = 100
59+
name = "colors"
60+
type = "list(string)"
61+
form_type = "multi-select"
62+
order = 100
6363

6464
dynamic "option" {
6565
for_each = keys(local.colors)
@@ -78,10 +78,10 @@ locals {
7878
}
7979

8080
data "coder_parameter" "thing" {
81-
name = "thing"
82-
type = "string"
83-
form_type = "dropdown"
84-
order = 101
81+
name = "thing"
82+
type = "string"
83+
form_type = "dropdown"
84+
order = 101
8585

8686
dynamic "option" {
8787
for_each = local.things
@@ -94,10 +94,10 @@ data "coder_parameter" "thing" {
9494

9595
// Cool people like blue. Idk what to tell you.
9696
data "coder_parameter" "cool" {
97-
count = contains(local.selected, "blue") ? 1 : 0
98-
name = "cool"
99-
type = "bool"
100-
form_type = "switch"
101-
order = 102
102-
default = "true"
97+
count = contains(local.selected, "blue") ? 1 : 0
98+
name = "cool"
99+
type = "bool"
100+
form_type = "switch"
101+
order = 102
102+
default = "true"
103103
}

0 commit comments

Comments
 (0)