mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 14:24:20 +02:00
satisfy full linter
This commit is contained in:
@@ -26,6 +26,7 @@ import (
|
||||
)
|
||||
|
||||
func any2string(in any) string {
|
||||
//nolint:gocritic
|
||||
switch val := in.(type) {
|
||||
case string:
|
||||
return val
|
||||
@@ -45,10 +46,10 @@ func any2string(in any) string {
|
||||
return val.Format("2006-01-02 15:04:05")
|
||||
case []byte:
|
||||
return string(val)
|
||||
case types.DateTime, types.Percentage:
|
||||
return val.(string)
|
||||
case nil:
|
||||
return "null"
|
||||
case types.Percentage, types.DateTime:
|
||||
return val.(string)
|
||||
}
|
||||
|
||||
return ""
|
||||
@@ -78,6 +79,7 @@ func (data *Table) preprocessRows() {
|
||||
// determine max width per column
|
||||
for _, entries := range data.rows {
|
||||
currentWidth := 0
|
||||
|
||||
for idx, entry := range entries {
|
||||
length := visibleLen(entry)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user