File tree 2 files changed +29
-27
lines changed
2 files changed +29
-27
lines changed Original file line number Diff line number Diff line change
1
+ package common
2
+
3
+ import "context"
4
+
5
+ var (
6
+ // ResourceName is resource name without databricks_ prefix
7
+ ResourceName contextKey = 1
8
+ // Provider is the current instance of provider
9
+ Provider contextKey = 2
10
+ // Current is the current name of integration test
11
+ Current contextKey = 3
12
+ // If current resource is data
13
+ IsData contextKey = 4
14
+ // apiVersion
15
+ Api contextKey = 5
16
+ // SDK used
17
+ Sdk contextKey = 6
18
+ )
19
+
20
+ type contextKey int
21
+
22
+ func (k contextKey ) GetOrUnknown (ctx context.Context ) string {
23
+ rn , ok := ctx .Value (k ).(string )
24
+ if ! ok {
25
+ return "unknown"
26
+ }
27
+ return rn
28
+ }
Original file line number Diff line number Diff line change 1
1
package common
2
2
3
- import "context"
4
-
5
- var (
6
- version = "1.73.0"
7
- // ResourceName is resource name without databricks_ prefix
8
- ResourceName contextKey = 1
9
- // Provider is the current instance of provider
10
- Provider contextKey = 2
11
- // Current is the current name of integration test
12
- Current contextKey = 3
13
- // If current resource is data
14
- IsData contextKey = 4
15
- // apiVersion
16
- Api contextKey = 5
17
- // SDK used
18
- Sdk contextKey = 6
19
- )
20
-
21
- type contextKey int
22
-
23
- func (k contextKey ) GetOrUnknown (ctx context.Context ) string {
24
- rn , ok := ctx .Value (k ).(string )
25
- if ! ok {
26
- return "unknown"
27
- }
28
- return rn
29
- }
3
+ var version = "1.73.0"
30
4
31
5
// Version returns version of provider
32
6
func Version () string {
You can’t perform that action at this time.
0 commit comments