goimport lint

This commit is contained in:
Jeff Carr 2025-02-02 13:05:42 -06:00
parent ad6bb0f1c1
commit d4b7cd32d4
Notes: Jeff Carr 2025-02-07 09:58:15 -06:00
// `autogen:go.mod`

module go.wit.com/widget

go 1.22

toolchain go1.23.4

// `autogen:`
9 changed files with 61 additions and 58 deletions

View File

@ -1,4 +1,4 @@
all: all: goimports vet
@echo @echo
@echo This defines the primitive widgets @echo This defines the primitive widgets
@echo @echo
@ -19,3 +19,7 @@ redomod:
rm -f go.* rm -f go.*
GO111MODULE= go mod init GO111MODULE= go mod init
GO111MODULE= go mod tidy GO111MODULE= go mod tidy
vet:
@GO111MODULE=off go vet
@echo this go library builds okay

2
doc.go
View File

@ -5,7 +5,6 @@ There are lots of issues when supporting multiple toolkit plugin
geometries. The geometries vary widely especially between the geometries. The geometries vary widely especially between the
graphical displays and the serial console ones. [Graphical Widget](http://en.wikipedia.org/Graphical_Widget) graphical displays and the serial console ones. [Graphical Widget](http://en.wikipedia.org/Graphical_Widget)
To simplyfy this, we stick to using the concepts: To simplyfy this, we stick to using the concepts:
------------------------------ ^ ------------------------------ ^
@ -44,6 +43,7 @@ Horizontal means layout widgets like books on a bookshelf
--------------------------------- ---------------------------------
Vertical means layout widgets like books in a stack Vertical means layout widgets like books in a stack
---------- ----------
| Widget | | Widget |
---------- ----------

View File

@ -25,6 +25,7 @@ Horizontal means layout widgets like books on a bookshelf
--------------------------------- ---------------------------------
Vertical means layout widgets like books in a stack Vertical means layout widgets like books in a stack
---------- ----------
| Widget | | Widget |
---------- ----------
@ -51,5 +52,4 @@ func (s Orientation) String() string {
default: default:
return "Horizontal" return "Horizontal"
} }
return "Horizontal"
} }

View File

@ -56,7 +56,6 @@ func GetString(A any) string {
// log.Warn("getString uknown kind", k, "value =", A) // log.Warn("getString uknown kind", k, "value =", A)
return "" return ""
} }
return ""
} }
// work like unix os.Exec() ? everything other than 0 is false // work like unix os.Exec() ? everything other than 0 is false
@ -89,7 +88,6 @@ func GetBool(A any) bool {
// log.Warn("getString uknown kind", k, "value =", A) // log.Warn("getString uknown kind", k, "value =", A)
return false return false
} }
return false
} }
// work like unix? everything other than 0 is false // work like unix? everything other than 0 is false
@ -121,5 +119,4 @@ func GetInt(A any) int {
// log.Warn("getString uknown kind", k, "value =", A) // log.Warn("getString uknown kind", k, "value =", A)
return -1 return -1
} }
return -1
} }

View File

@ -1,5 +1,7 @@
package widget package widget
// TODO: redo this with protocol buffers
// This is the state of the widget // This is the state of the widget
// The whole state of the widget is sent // The whole state of the widget is sent