rev docker go + cleanup

mine
derailed 2020-01-10 13:16:23 -07:00
parent 8a15ece0c5
commit 7949c70929
6 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,5 @@
# Build...
FROM golang:1.12.6-alpine AS build
FROM golang:1.13.6-alpine3.11 AS build
WORKDIR /k9s
COPY go.mod go.sum main.go Makefile ./

View File

@ -29,7 +29,7 @@ const (
CreateVerb = "create"
// UpdateVerb represents an update access on a resource.
UpdateVerb = "update"
// UpdateVerb represents a patch access on a resource.
// PatchVerb represents a patch access on a resource.
PatchVerb = "patch"
// DeleteVerb represents a delete access on a resource.
DeleteVerb = "delete"
@ -46,7 +46,7 @@ var (
GetAccess = []string{GetVerb}
// ListAccess list resources.
ListAccess = []string{ListVerb}
// MonitorAcces monitors a collection of resources.
// MonitorAccess monitors a collection of resources.
MonitorAccess = []string{ListVerb, WatchVerb}
// ReadAllAccess represents an all read access to a resource.
ReadAllAccess = []string{GetVerb, ListVerb, WatchVerb}

View File

@ -145,6 +145,7 @@ func (l *Log) load() error {
return nil
}
// Append adds a log line.
func (l *Log) Append(line string) {
if line == "" {
return
@ -171,6 +172,7 @@ func (l *Log) Append(line string) {
log.Debug().Msgf("MODEL %d--%d", len(l.lines), l.lastSent)
}
// Notify fires of notifications to the listeners.
func (l *Log) Notify(timedOut bool) {
l.mx.Lock()
defer l.mx.Unlock()

View File

@ -62,7 +62,7 @@ func IsLabelSelector(s string) bool {
return LableRx.MatchString(s)
}
// IsFuzztySelector checks if query is fuzzy.
// IsFuzzySelector checks if query is fuzzy.
func IsFuzzySelector(s string) bool {
if s == "" {
return false

View File

@ -26,7 +26,7 @@ const (
logFmt = " Logs([fg:bg:]%s) "
// BOZO!! Canned! Need config tail line counts!
tailLineCount = 1_000
tailLineCount = 1000
defaultTimeout = 200 * time.Millisecond
)

View File

@ -27,7 +27,7 @@ func namespaced(n string) (string, string) {
return strings.Trim(ns, "/"), po
}
// Dump for debug.
// DumpFactory for debug.
func DumpFactory(f *Factory) {
log.Debug().Msgf("----------- FACTORIES -------------")
for ns := range f.factories {
@ -36,7 +36,7 @@ func DumpFactory(f *Factory) {
log.Debug().Msgf("-----------------------------------")
}
// Debug for debug.
// DebugFactory for debug.
func DebugFactory(f *Factory, ns string, gvr string) {
log.Debug().Msgf("----------- DEBUG FACTORY (%s) -------------", gvr)
fac, ok := f.factories[ns]