style(frontend): gofmt the apiserver and xcecli sources
Formatting only (gofmt -w on the 29 non-vendored, non-generated files gofmt -l reported); swag-generated apiserver/docs/docs.go left as is. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b57ce6d6a9
commit
3615c7c0fb
29 changed files with 1280 additions and 1285 deletions
|
|
@ -1,45 +1,45 @@
|
|||
package output
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"text/tabwriter"
|
||||
"xcecli/models"
|
||||
)
|
||||
|
||||
type Output struct {
|
||||
fields string
|
||||
formatJson bool
|
||||
noheader bool
|
||||
verbose bool
|
||||
wideFormat bool
|
||||
jobStatusFilter []string
|
||||
}
|
||||
|
||||
func NewOutput(fields string, formatJson bool, noheader bool) *Output {
|
||||
return &Output{fields: fields, formatJson: formatJson, noheader: noheader}
|
||||
}
|
||||
|
||||
func (o *Output) SetVerbose(verbose bool) {
|
||||
o.verbose = verbose
|
||||
}
|
||||
|
||||
func (o *Output) SetNoHeader(noheader bool) {
|
||||
o.noheader = noheader
|
||||
}
|
||||
|
||||
func (o *Output) SetWideFormat(wideFormat bool) {
|
||||
o.wideFormat = wideFormat
|
||||
}
|
||||
|
||||
func (o *Output) ClusterPrintData(cluster *models.ClusterInfo) {
|
||||
printClustersVerboseOutput(cluster)
|
||||
}
|
||||
|
||||
func printClustersVerboseOutput(clusters *models.ClusterInfo) {
|
||||
w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', 0)
|
||||
defer w.Flush()
|
||||
fmt.Fprintf(w, "XCE Standard Cluster\t%s\t%s\n", clusters.Version, "Jul 08 2025")
|
||||
fmt.Fprintf(w, "My cluster name: <%s>\n", clusters.ClusterName)
|
||||
fmt.Fprintf(w, "The cluster status: <%s>\n", clusters.Status)
|
||||
}
|
||||
package output
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"text/tabwriter"
|
||||
"xcecli/models"
|
||||
)
|
||||
|
||||
type Output struct {
|
||||
fields string
|
||||
formatJson bool
|
||||
noheader bool
|
||||
verbose bool
|
||||
wideFormat bool
|
||||
jobStatusFilter []string
|
||||
}
|
||||
|
||||
func NewOutput(fields string, formatJson bool, noheader bool) *Output {
|
||||
return &Output{fields: fields, formatJson: formatJson, noheader: noheader}
|
||||
}
|
||||
|
||||
func (o *Output) SetVerbose(verbose bool) {
|
||||
o.verbose = verbose
|
||||
}
|
||||
|
||||
func (o *Output) SetNoHeader(noheader bool) {
|
||||
o.noheader = noheader
|
||||
}
|
||||
|
||||
func (o *Output) SetWideFormat(wideFormat bool) {
|
||||
o.wideFormat = wideFormat
|
||||
}
|
||||
|
||||
func (o *Output) ClusterPrintData(cluster *models.ClusterInfo) {
|
||||
printClustersVerboseOutput(cluster)
|
||||
}
|
||||
|
||||
func printClustersVerboseOutput(clusters *models.ClusterInfo) {
|
||||
w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', 0)
|
||||
defer w.Flush()
|
||||
fmt.Fprintf(w, "XCE Standard Cluster\t%s\t%s\n", clusters.Version, "Jul 08 2025")
|
||||
fmt.Fprintf(w, "My cluster name: <%s>\n", clusters.ClusterName)
|
||||
fmt.Fprintf(w, "The cluster status: <%s>\n", clusters.Status)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue