This commit is contained in:
Nate Jones 2018-04-16 17:08:57 -07:00
parent 51c099c18c
commit 4c4b3c154a

View file

@ -1,8 +1,8 @@
package main package main
import ( import (
"github.com/fsouza/go-dockerclient"
"github.com/dustin/go-humanize" "github.com/dustin/go-humanize"
"github.com/fsouza/go-dockerclient"
"bytes" "bytes"
"crypto/sha256" "crypto/sha256"
@ -513,10 +513,10 @@ func SanitizeCommand(CommandStr string,MaxLength int) string {
temp := CommandStr temp := CommandStr
// remove prefixes that don't add meaning // remove prefixes that don't add meaning
if(strings.HasPrefix(temp,"/bin/sh -c")) { if strings.HasPrefix(temp, "/bin/sh -c") {
temp = strings.TrimSpace(temp[10:]) temp = strings.TrimSpace(temp[10:])
} }
if(strings.HasPrefix(temp,"#(nop)")) { if strings.HasPrefix(temp, "#(nop)") {
temp = strings.TrimSpace(temp[6:]) temp = strings.TrimSpace(temp[6:])
} }
@ -530,7 +530,6 @@ func SanitizeCommand(CommandStr string,MaxLength int) string {
return truncate(temp, MaxLength) return truncate(temp, MaxLength)
} }
func init() { func init() {
parser.AddCommand("images", parser.AddCommand("images",
"Visualize docker images.", "Visualize docker images.",