Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit bf466b0

Browse files
committed
fixup! fixup! Add tab:"omit" struct tag
1 parent 8863971 commit bf466b0

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

internal/entclient/me.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import (
66

77
// User describes a Coder user account
88
type User struct {
9-
ID string `json:"id" tab:"omit"`
9+
ID string `json:"id" tab:"-"`
1010
Email string `json:"email"`
1111
Username string `json:"username"`
1212
Name string `json:"name"`
1313
CreatedAt time.Time `json:"created_at"`
14-
UpdatedAt time.Time `json:"updated_at" tab:"omit"`
14+
UpdatedAt time.Time `json:"updated_at" tab:"-"`
1515
}
1616

1717
// Me gets the details of the authenticated user

internal/entclient/secrets.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import (
77

88
// Secret describes a Coder secret
99
type Secret struct {
10-
ID string `json:"id" tab:"omit"`
10+
ID string `json:"id" tab:"-"`
1111
Name string `json:"name"`
1212
Value string `json:"value,omitempty"`
1313
Description string `json:"description"`
1414
CreatedAt time.Time `json:"created_at"`
15-
UpdatedAt time.Time `json:"updated_at" tab:"omit"`
15+
UpdatedAt time.Time `json:"updated_at" tab:"-"`
1616
}
1717

1818
// Secrets gets all secrets owned by the authed user

internal/x/xtabwriter/tabwriter.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func NewWriter() *tabwriter.Writer {
1717

1818
// StructValues tab delimits the values of a given struct.
1919
//
20-
// Tag a field `tab:"omit"` to hide it from output.
20+
// Tag a field `tab:"-"` to hide it from output.
2121
func StructValues(data interface{}) string {
2222
v := reflect.ValueOf(data)
2323
s := &strings.Builder{}
@@ -32,7 +32,7 @@ func StructValues(data interface{}) string {
3232

3333
// StructFieldNames tab delimits the field names of a given struct.
3434
//
35-
// Tag a field `tab:"omit"` to hide it from output.
35+
// Tag a field `tab:"-"` to hide it from output.
3636
func StructFieldNames(data interface{}) string {
3737
v := reflect.ValueOf(data)
3838
s := &strings.Builder{}
@@ -47,5 +47,5 @@ func StructFieldNames(data interface{}) string {
4747
}
4848

4949
func shouldHideField(f reflect.StructField) bool {
50-
return f.Tag.Get(structFieldTagKey) == "omit"
50+
return f.Tag.Get(structFieldTagKey) == "-"
5151
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy