start droplet

This commit is contained in:
Jeff Carr 2024-02-29 13:45:36 -06:00
parent adc8a7604a
commit e575b71f07
3 changed files with 42 additions and 3 deletions

View File

@ -1,10 +1,16 @@
all: GUIVERSION = $(shell cd ~/go/src/go.wit.com/gui; git describe --tags)
all: build
vet:
@#GO111MODULE=off go build @#GO111MODULE=off go build
@GO111MODULE=off go vet -x @GO111MODULE=off go vet -x
@echo this go library package builds okay @echo this go library package builds okay
build: build:
@GO111MODULE=off go build -x -o junk @GO111MODULE=off go build -v -x -o junk \
-ldflags "-X main.GUIVERSION=${GUIVERSION}" \
-ldflags "-X go.wit.com/gui.GUIVERSION=${GUIVERSION}"
./junk ./junk
goimports: goimports:
@ -16,3 +22,7 @@ redomod:
GO111MODULE= go mod init GO111MODULE= go mod init
GO111MODULE= go mod tidy GO111MODULE= go mod tidy
actual: redomod
GO111MODULE= go build -x -o junk
./junk

View File

@ -48,7 +48,6 @@ func main() {
l := Less(c, s) l := Less(c, s)
fmt.Printf("%v is the smallest\n", l) fmt.Printf("%v is the smallest\n", l)
} }
func Less(s1, s2 Sizer) Sizer { func Less(s1, s2 Sizer) Sizer {

30
droplet.go Normal file
View File

@ -0,0 +1,30 @@
package main
import (
"fmt"
"go.wit.com/gui"
)
type Size interface {
Cpus() int
Memory() float64
Disk() float64
}
type Menu interface {
Widget() *gui.Node
}
type Draw interface {
Show() bool
Hide()
}
type Droplet interface {
Draw
Menu
Size
// Location
fmt.Stringer
}