forked from bflad/tfproviderlint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
47 lines (40 loc) · 891 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package a
import (
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)
func f() {
// This first scenario is valid because Schema may be used within Elem
// which should not require Description
_ = schema.Schema{
Type: schema.TypeString,
}
_ = map[string]*schema.Schema{
"name": { // want "schema should configure Description"
Optional: true,
Type: schema.TypeString,
},
}
_ = map[string]*schema.Schema{
"name": {
Description: "test",
Optional: true,
Type: schema.TypeString,
},
}
_ = map[string]*schema.Schema{
"name": {
Description: "Line one.\n\n" +
"Line two.",
Optional: true,
Type: schema.TypeString,
},
}
descriptions := map[string]string{"name": "test"}
_ = map[string]*schema.Schema{
"name": {
Description: descriptions["name"],
Optional: true,
Type: schema.TypeString,
},
}
}