From 48f633e0cb2a14b167c81ca6a630713cc10ee294 Mon Sep 17 00:00:00 2001 From: "L. Yeung" Date: Sat, 24 Aug 2024 12:19:01 +0800 Subject: [PATCH] fix(export): omit specific fields --- src/config/segment.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/config/segment.go b/src/config/segment.go index c69fa2bb..6248d47a 100644 --- a/src/config/segment.go +++ b/src/config/segment.go @@ -53,13 +53,13 @@ type Segment struct { MaxWidth int `json:"max_width,omitempty" toml:"max_width,omitempty"` MinWidth int `json:"min_width,omitempty" toml:"min_width,omitempty"` Filler string `json:"filler,omitempty" toml:"filler,omitempty"` - Background color.Ansi `json:"background" toml:"background"` - Foreground color.Ansi `json:"foreground" toml:"foreground"` + Background color.Ansi `json:"background,omitempty" toml:"background,omitempty"` + Foreground color.Ansi `json:"foreground,omitempty" toml:"foreground,omitempty"` Newline bool `json:"newline,omitempty" toml:"newline,omitempty"` Enabled bool `json:"-" toml:"-"` - Text string + Text string `json:"-" toml:"-"` env runtime.Environment writer SegmentWriter @@ -67,8 +67,8 @@ type Segment struct { name string // debug info - Duration time.Duration - NameLength int + Duration time.Duration `json:"-" toml:"-"` + NameLength int `json:"-" toml:"-"` } func (segment *Segment) Name() string {