This repository was archived by the owner on Aug 30, 2024. It is now read-only.
File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ import (
6
6
7
7
// User describes a Coder user account
8
8
type User struct {
9
- ID string `json:"id" tab:"omit "`
9
+ ID string `json:"id" tab:"- "`
10
10
Email string `json:"email"`
11
11
Username string `json:"username"`
12
12
Name string `json:"name"`
13
13
CreatedAt time.Time `json:"created_at"`
14
- UpdatedAt time.Time `json:"updated_at" tab:"omit "`
14
+ UpdatedAt time.Time `json:"updated_at" tab:"- "`
15
15
}
16
16
17
17
// Me gets the details of the authenticated user
Original file line number Diff line number Diff line change @@ -7,12 +7,12 @@ import (
7
7
8
8
// Secret describes a Coder secret
9
9
type Secret struct {
10
- ID string `json:"id" tab:"omit "`
10
+ ID string `json:"id" tab:"- "`
11
11
Name string `json:"name"`
12
12
Value string `json:"value,omitempty"`
13
13
Description string `json:"description"`
14
14
CreatedAt time.Time `json:"created_at"`
15
- UpdatedAt time.Time `json:"updated_at" tab:"omit "`
15
+ UpdatedAt time.Time `json:"updated_at" tab:"- "`
16
16
}
17
17
18
18
// Secrets gets all secrets owned by the authed user
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ func NewWriter() *tabwriter.Writer {
17
17
18
18
// StructValues tab delimits the values of a given struct.
19
19
//
20
- // Tag a field `tab:"omit "` to hide it from output.
20
+ // Tag a field `tab:"- "` to hide it from output.
21
21
func StructValues (data interface {}) string {
22
22
v := reflect .ValueOf (data )
23
23
s := & strings.Builder {}
@@ -32,7 +32,7 @@ func StructValues(data interface{}) string {
32
32
33
33
// StructFieldNames tab delimits the field names of a given struct.
34
34
//
35
- // Tag a field `tab:"omit "` to hide it from output.
35
+ // Tag a field `tab:"- "` to hide it from output.
36
36
func StructFieldNames (data interface {}) string {
37
37
v := reflect .ValueOf (data )
38
38
s := & strings.Builder {}
@@ -47,5 +47,5 @@ func StructFieldNames(data interface{}) string {
47
47
}
48
48
49
49
func shouldHideField (f reflect.StructField ) bool {
50
- return f .Tag .Get (structFieldTagKey ) == "omit "
50
+ return f .Tag .Get (structFieldTagKey ) == "- "
51
51
}
You can’t perform that action at this time.
0 commit comments