Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
/coder-v1-cliPublic archive

Commitbf466b0

Browse files
committed
fixup! fixup! Addtab:"omit" struct tag
1 parent8863971 commitbf466b0

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
typeUserstruct {
9-
IDstring`json:"id" tab:"omit"`
9+
IDstring`json:"id" tab:"-"`
1010
Emailstring`json:"email"`
1111
Usernamestring`json:"username"`
1212
Namestring`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
typeSecretstruct {
10-
IDstring`json:"id" tab:"omit"`
10+
IDstring`json:"id" tab:"-"`
1111
Namestring`json:"name"`
1212
Valuestring`json:"value,omitempty"`
1313
Descriptionstring`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
funcStructValues(datainterface{})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
funcStructFieldNames(datainterface{})string {
3737
v:=reflect.ValueOf(data)
3838
s:=&strings.Builder{}
@@ -47,5 +47,5 @@ func StructFieldNames(data interface{}) string {
4747
}
4848

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp