repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/util/util_test.go
src/util/util_test.go
package util import ( "math" "strings" "testing" ) func TestConstrain(t *testing.T) { if Constrain(-3, -1, 3) != -1 { t.Error("Expected", -1) } if Constrain(2, -1, 3) != 2 { t.Error("Expected", 2) } if Constrain(5, -1, 3) != 3 { t.Error("Expected", 3) } } func TestAsUint16(t *testing.T) { if AsUint1...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/util/atomicbool.go
src/util/atomicbool.go
package util import ( "sync/atomic" ) func convertBoolToInt32(b bool) int32 { if b { return 1 } return 0 } // AtomicBool is a boxed-class that provides synchronized access to the // underlying boolean value type AtomicBool struct { state int32 // "1" is true, "0" is false } // NewAtomicBool returns a new Ato...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/protector/protector.go
src/protector/protector.go
//go:build !openbsd package protector // Protect calls OS specific protections like pledge on OpenBSD func Protect() {}
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/protector/protector_openbsd.go
src/protector/protector_openbsd.go
//go:build openbsd package protector import "golang.org/x/sys/unix" // Protect calls OS specific protections like pledge on OpenBSD func Protect() { unix.PledgePromises("stdio dpath wpath rpath tty proc exec inet tmppath") }
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/algo/algo_test.go
src/algo/algo_test.go
package algo import ( "math" "sort" "strings" "testing" "github.com/junegunn/fzf/src/util" ) func init() { Init("default") } func assertMatch(t *testing.T, fun Algo, caseSensitive, forward bool, input, pattern string, sidx int, eidx int, score int) { assertMatch2(t, fun, caseSensitive, false, forward, input,...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/algo/algo.go
src/algo/algo.go
package algo /* Algorithm --------- FuzzyMatchV1 finds the first "fuzzy" occurrence of the pattern within the given text in O(n) time where n is the length of the text. Once the position of the last character is located, it traverses backwards to see if there's a shorter substring that matches the pattern. a___...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/algo/normalize.go
src/algo/normalize.go
// Normalization of latin script letters // Reference: http://www.unicode.org/Public/UCD/latest/ucd/Index.txt package algo var normalized = map[rune]rune{ 0x00E1: 'a', // WITH ACUTE, LATIN SMALL LETTER 0x0103: 'a', // WITH BREVE, LATIN SMALL LETTER 0x01CE: 'a', // WITH CARON, LATIN SMALL LETTER 0x00E2: 'a', //...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/tui/tui_test.go
src/tui/tui_test.go
package tui import "testing" func TestHexToColor(t *testing.T) { assert := func(expr string, r, g, b int) { color := HexToColor(expr) if !color.is24() || int((color>>16)&0xff) != r || int((color>>8)&0xff) != g || int((color)&0xff) != b { t.Fail() } } assert("#ff0000", 255, 0, 0) assert("#010203...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/tui/tcell.go
src/tui/tcell.go
//go:build tcell || windows package tui import ( "os" "regexp" "time" "github.com/gdamore/tcell/v2" "github.com/junegunn/fzf/src/util" "github.com/rivo/uniseg" ) func HasFullscreenRenderer() bool { return true } var DefaultBorderShape BorderShape = BorderSharp func asTcellColor(color Color) tcell.Color { ...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/tui/light_unix.go
src/tui/light_unix.go
//go:build !windows package tui import ( "errors" "os" "os/exec" "strings" "syscall" "github.com/junegunn/fzf/src/util" "golang.org/x/sys/unix" "golang.org/x/term" ) func IsLightRendererSupported() bool { return true } func (r *LightRenderer) DefaultTheme() *ColorTheme { if strings.Contains(os.Getenv("TE...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/tui/tui.go
src/tui/tui.go
package tui import ( "strconv" "time" "github.com/junegunn/fzf/src/util" "github.com/rivo/uniseg" ) type Attr int32 const ( AttrUndefined = Attr(0) AttrRegular = Attr(1 << 8) AttrClear = Attr(1 << 9) BoldForce = Attr(1 << 10) FullBg = Attr(1 << 11) Strip = Attr(1 << 12) ) func (a...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/tui/eventtype_string.go
src/tui/eventtype_string.go
// Code generated by "stringer -type=EventType"; DO NOT EDIT. package tui import "strconv" func _() { // An "invalid array index" compiler error signifies that the constant values have changed. // Re-run the stringer command to generate them again. var x [1]struct{} _ = x[Rune-0] _ = x[CtrlA-1] _ = x[CtrlB-2] ...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/tui/light_test.go
src/tui/light_test.go
package tui import ( "fmt" "os" "testing" "unicode" ) func TestLightRenderer(t *testing.T) { tty_file, _ := os.Open("") renderer, _ := NewLightRenderer( "", tty_file, &ColorTheme{}, true, false, 0, false, true, func(h int) int { return h }) light_renderer := renderer.(*LightRenderer) assertCharSequence ...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/tui/light_windows.go
src/tui/light_windows.go
//go:build windows package tui import ( "os" "syscall" "time" "github.com/junegunn/fzf/src/util" "golang.org/x/sys/windows" ) const ( timeoutInterval = 10 ) var ( consoleFlagsInput = uint32(windows.ENABLE_VIRTUAL_TERMINAL_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_EXTENDED_FLAGS) consoleFlags...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/tui/ttyname_windows.go
src/tui/ttyname_windows.go
//go:build windows package tui import ( "os" ) func ttyname() string { return "" } // TtyIn on Windows returns os.Stdin func TtyIn(ttyDefault string) (*os.File, error) { return os.Stdin, nil } // TtyOut on Windows returns nil func TtyOut(ttyDefault string) (*os.File, error) { return nil, nil }
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/tui/tcell_test.go
src/tui/tcell_test.go
//go:build tcell || windows package tui import ( "os" "testing" "github.com/gdamore/tcell/v2" "github.com/junegunn/fzf/src/util" ) func assert(t *testing.T, context string, got any, want any) bool { if got == want { return true } else { t.Errorf("%s = (%T)%v, want (%T)%v", context, got, got, want, want) ...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/tui/dummy.go
src/tui/dummy.go
//go:build !tcell && !windows package tui const ( Bold = Attr(1) Dim = Attr(1 << 1) Italic = Attr(1 << 2) Underline = Attr(1 << 3) Blink = Attr(1 << 4) Blink2 = Attr(1 << 5) Reverse = Attr(1 << 6) StrikeThrough = Attr(1 << 7) ) func HasFullscreenRenderer() b...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/tui/light.go
src/tui/light.go
package tui import ( "bytes" "errors" "fmt" "os" "regexp" "strconv" "strings" "sync" "time" "unicode/utf8" "github.com/junegunn/fzf/src/util" "github.com/rivo/uniseg" "golang.org/x/term" ) const ( defaultWidth = 80 defaultHeight = 24 defaultEscDelay = 100 escPollInterval = 5 offsetPollTries = 10...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
true
junegunn/fzf
https://github.com/junegunn/fzf/blob/3c7cbc9d476025e0cf90e2303bce38935898df1f/src/tui/ttyname_unix.go
src/tui/ttyname_unix.go
//go:build !windows package tui import ( "os" "sync/atomic" "syscall" ) var devPrefixes = [...]string{"/dev/pts/", "/dev/"} var tty atomic.Value func ttyname() string { if cached := tty.Load(); cached != nil { return cached.(string) } var stderr syscall.Stat_t if syscall.Fstat(2, &stderr) != nil { retu...
go
MIT
3c7cbc9d476025e0cf90e2303bce38935898df1f
2026-01-07T08:35:43.431645Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/main.go
cmd/dive/main.go
package main // Copyright © 2018 Alex Goodman // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merg...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/cli_test.go
cmd/dive/cli/cli_test.go
package cli import ( "bytes" "flag" "github.com/anchore/clio" "github.com/charmbracelet/lipgloss" snapsPkg "github.com/gkampitakis/go-snaps/snaps" "github.com/google/shlex" "github.com/muesli/termenv" "github.com/spf13/cobra" "github.com/stretchr/testify/require" "go.uber.org/atomic" "io" "os" "os/exec" ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/cli_build_test.go
cmd/dive/cli/cli_build_test.go
package cli import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "regexp" "testing" ) func Test_Build_Dockerfile(t *testing.T) { t.Setenv("DIVE_CONFIG", "./testdata/image-multi-layer-dockerfile/dive-pass.yaml") t.Run("implicit dockerfile", func(t *testing.T) { rootCmd := getTes...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/cli_config_test.go
cmd/dive/cli/cli_config_test.go
package cli import ( "github.com/stretchr/testify/require" "testing" ) func Test_Config(t *testing.T) { t.Setenv("DIVE_CONFIG", "./testdata/image-multi-layer-dockerfile/dive-pass.yaml") rootCmd := getTestCommand(t, "config --load") all := Capture().All().Run(t, func() { require.NoError(t, rootCmd.Execute()) ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/cli_json_test.go
cmd/dive/cli/cli_json_test.go
package cli import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "os" "path/filepath" "testing" ) func Test_JsonOutput(t *testing.T) { t.Run("json output", func(t *testing.T) { dest := t.TempDir() file := filepath.Join(dest, "output.json") rootCmd := getTestCommand(t, "busy...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/cli_load_test.go
cmd/dive/cli/cli_load_test.go
package cli import ( "fmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "os" "os/exec" "testing" ) func Test_LoadImage(t *testing.T) { image := "busybox:1.37.0@sha256:ad9fa4d07136a83e69a54ef00102f579d04eba431932de3b0f098cc5d5948f9f" archive := repoPath(t, ".data/test-docker-image...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/cli.go
cmd/dive/cli/cli.go
package cli import ( "github.com/anchore/clio" "github.com/spf13/cobra" "github.com/wagoodman/dive/cmd/dive/cli/internal/command" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui" "github.com/wagoodman/dive/internal/bus" "github.com/wagoodman/dive/internal/log" ) func Application(id clio.Identification) clio...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/cli_ci_test.go
cmd/dive/cli/cli_ci_test.go
package cli import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "testing" ) func Test_CI_DefaultCIConfig(t *testing.T) { // this lets the test harness to unset any DIVE_CONFIG env var t.Setenv("DIVE_CONFIG", "-") rootCmd := getTestCommand(t, repoPath(t, ".data/test-docker-image....
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/options/ci_rules.go
cmd/dive/cli/internal/options/ci_rules.go
package options import ( "github.com/anchore/clio" "github.com/wagoodman/dive/cmd/dive/cli/internal/command/ci" "github.com/wagoodman/dive/internal/log" ) type CIRules struct { LowestEfficiencyThresholdString string `yaml:"lowest-efficiency" mapstructure:"lowest-efficiency"` LegacyLowestEfficiencyThreshold...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/options/ci.go
cmd/dive/cli/internal/options/ci.go
package options import ( "fmt" "github.com/anchore/clio" "gopkg.in/yaml.v3" "os" ) var _ interface { clio.PostLoader clio.FieldDescriber clio.FlagAdder } = (*CI)(nil) const defaultCIConfigPath = ".dive-ci" type CI struct { Enabled bool `yaml:"ci" mapstructure:"ci"` ConfigPath string `yaml:"ci-config...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/options/ui_diff.go
cmd/dive/cli/internal/options/ui_diff.go
package options import ( "github.com/anchore/clio" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1" "github.com/wagoodman/dive/internal/log" ) var _ interface { clio.PostLoader clio.FieldDescriber } = (*UIDiff)(nil) // UIDiff provides configuration for how differences are displayed type UIDiff struct { ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/options/ui_keybindings.go
cmd/dive/cli/internal/options/ui_keybindings.go
package options import ( "github.com/anchore/clio" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/key" "reflect" ) var _ interface { clio.FieldDescriber } = (*UIKeybindings)(nil) // UIKeybindings provides configuration for all keyboard shortcuts type UIKeybindings struct { Global GlobalBindings ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/options/ui_layers.go
cmd/dive/cli/internal/options/ui_layers.go
package options import "github.com/anchore/clio" var _ clio.FieldDescriber = (*UILayers)(nil) // UILayers provides configuration for layer display behavior type UILayers struct { ShowAggregatedChanges bool `yaml:"show-aggregated-changes" mapstructure:"show-aggregated-changes"` } func DefaultUILayers() UILayers { ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/options/export.go
cmd/dive/cli/internal/options/export.go
package options import ( "fmt" "os" "path" "github.com/anchore/clio" ) var _ interface { clio.FlagAdder clio.PostLoader } = (*Export)(nil) // Export provides configuration for data export functionality type Export struct { // Path to export analysis results as JSON (empty string = disabled) JsonPath string ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/options/ui.go
cmd/dive/cli/internal/options/ui.go
package options // UI combines all UI configuration elements type UI struct { Keybinding UIKeybindings `yaml:"keybinding" mapstructure:"keybinding"` Diff UIDiff `yaml:"diff" mapstructure:"diff"` Filetree UIFiletree `yaml:"filetree" mapstructure:"filetree"` Layer UILayers `yaml:"layer" m...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/options/application.go
cmd/dive/cli/internal/options/application.go
package options import ( "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1" ) type Application struct { Analysis Analysis `yaml:",inline" mapstructure:",squash"` CI CI `yaml:",inline" mapstructure:",squash"` Export Export `yaml:",inline" mapstructure:",squash"` UI UI `yaml:",inli...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/options/ui_filetree.go
cmd/dive/cli/internal/options/ui_filetree.go
package options import ( "github.com/anchore/clio" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1" "github.com/wagoodman/dive/internal/log" ) var _ interface { clio.PostLoader clio.FieldDescriber } = (*UIFiletree)(nil) // UIFiletree provides configuration for the file tree display type UIFiletree struct...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/options/analysis.go
cmd/dive/cli/internal/options/analysis.go
package options import ( "fmt" "github.com/anchore/clio" "github.com/scylladb/go-set/strset" "github.com/wagoodman/dive/dive" "github.com/wagoodman/dive/internal/log" "strings" ) const defaultContainerEngine = "docker" var _ interface { clio.PostLoader clio.FieldDescriber } = (*Analysis)(nil) // Analysis pr...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/root.go
cmd/dive/cli/internal/command/root.go
package command import ( "context" "errors" "fmt" "github.com/anchore/clio" "github.com/spf13/afero" "github.com/spf13/cobra" "github.com/wagoodman/dive/cmd/dive/cli/internal/command/adapter" "github.com/wagoodman/dive/cmd/dive/cli/internal/options" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui" "githu...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/build.go
cmd/dive/cli/internal/command/build.go
package command import ( "fmt" "github.com/anchore/clio" "github.com/spf13/cobra" "github.com/wagoodman/dive/cmd/dive/cli/internal/command/adapter" "github.com/wagoodman/dive/cmd/dive/cli/internal/options" "github.com/wagoodman/dive/dive" ) type buildOptions struct { options.Application `yaml:",inline" mapstru...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/ci/rules.go
cmd/dive/cli/internal/command/ci/rules.go
package ci import ( "errors" "fmt" "github.com/dustin/go-humanize" "github.com/wagoodman/dive/dive/image" "strconv" "strings" ) const ( ciKeyLowestEfficiencyThreshold = "lowestEfficiency" ciKeyHighestWastedBytes = "highestWastedBytes" ciKeyHighestUserWastedPercent = "highestUserWastedPercent" ) func...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/ci/evaluator_test.go
cmd/dive/cli/internal/command/ci/evaluator_test.go
package ci import ( "context" "github.com/stretchr/testify/require" "go.uber.org/atomic" "os/exec" "path/filepath" "strings" "testing" "github.com/wagoodman/dive/dive/image/docker" ) var repoRootCache atomic.String func Test_Evaluator(t *testing.T) { result := docker.TestAnalysisFromArchive(t, repoPath(t, ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/ci/rule.go
cmd/dive/cli/internal/command/ci/rule.go
package ci import ( "github.com/wagoodman/dive/dive/image" ) const ( RuleUnknown = iota RulePassed RuleFailed RuleWarning RuleDisabled RuleMisconfigured RuleConfigured ) type Rule interface { Key() string Configuration() string Evaluate(result *image.Analysis) (RuleStatus, string) } type RuleStatus int ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/ci/evaluator.go
cmd/dive/cli/internal/command/ci/evaluator.go
package ci import ( "fmt" "github.com/charmbracelet/lipgloss" "golang.org/x/net/context" "sort" "strconv" "strings" "github.com/dustin/go-humanize" "github.com/wagoodman/dive/dive/image" ) type Evaluation struct { Report string Pass bool } type Evaluator struct { Rules []Rule Results ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/export/main_test.go
cmd/dive/cli/internal/command/export/main_test.go
package export import ( "flag" "github.com/charmbracelet/lipgloss" snapsPkg "github.com/gkampitakis/go-snaps/snaps" "github.com/muesli/termenv" "github.com/stretchr/testify/require" "go.uber.org/atomic" "os" "os/exec" "path/filepath" "strings" "testing" ) var ( updateSnapshot = flag.Bool("update", false, ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/export/export.go
cmd/dive/cli/internal/command/export/export.go
package export import ( "encoding/json" "github.com/wagoodman/dive/dive/filetree" diveImage "github.com/wagoodman/dive/dive/image" "github.com/wagoodman/dive/internal/log" ) type Export struct { Layer []Layer `json:"layer"` Image Image `json:"image"` } type Layer struct { Index int `json...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/export/export_test.go
cmd/dive/cli/internal/command/export/export_test.go
package export import ( "testing" "github.com/wagoodman/dive/dive/image/docker" ) func Test_Export(t *testing.T) { result := docker.TestAnalysisFromArchive(t, repoPath(t, ".data/test-docker-image.tar")) export := NewExport(result) payload, err := export.Marshal() if err != nil { t.Errorf("Test_Export: unabl...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/adapter/resolver.go
cmd/dive/cli/internal/command/adapter/resolver.go
package adapter import ( "context" "github.com/wagoodman/dive/dive/image" "github.com/wagoodman/dive/internal/bus" "github.com/wagoodman/dive/internal/bus/event/payload" "github.com/wagoodman/dive/internal/log" "strings" "time" ) type imageActionObserver struct { image.Resolver } func ImageResolver(resolver ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/adapter/exporter.go
cmd/dive/cli/internal/command/adapter/exporter.go
package adapter import ( "context" "fmt" "github.com/spf13/afero" "github.com/wagoodman/dive/cmd/dive/cli/internal/command/export" "github.com/wagoodman/dive/dive/image" "github.com/wagoodman/dive/internal/bus" "github.com/wagoodman/dive/internal/bus/event/payload" "github.com/wagoodman/dive/internal/log" "os...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/adapter/analyzer.go
cmd/dive/cli/internal/command/adapter/analyzer.go
package adapter import ( "context" "fmt" "github.com/dustin/go-humanize" "github.com/wagoodman/dive/dive/image" "github.com/wagoodman/dive/internal/bus" "github.com/wagoodman/dive/internal/bus/event/payload" "github.com/wagoodman/dive/internal/log" ) type Analyzer interface { Analyze(ctx context.Context, img ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/command/adapter/evaluator.go
cmd/dive/cli/internal/command/adapter/evaluator.go
package adapter import ( "context" "fmt" "github.com/wagoodman/dive/cmd/dive/cli/internal/command/ci" "github.com/wagoodman/dive/dive/image" "github.com/wagoodman/dive/internal/bus" "github.com/wagoodman/dive/internal/bus/event/payload" "github.com/wagoodman/dive/internal/log" ) type Evaluator interface { Eva...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/no_ui.go
cmd/dive/cli/internal/ui/no_ui.go
package ui import ( "github.com/wagoodman/go-partybus" "github.com/anchore/clio" ) var _ clio.UI = (*NoUI)(nil) type NoUI struct { subscription partybus.Unsubscribable } func None() *NoUI { return &NoUI{} } func (n *NoUI) Setup(subscription partybus.Unsubscribable) error { n.subscription = subscription retu...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1.go
cmd/dive/cli/internal/ui/v1.go
package ui import ( "context" "fmt" "github.com/anchore/clio" "github.com/anchore/go-logger/adapter/discard" "github.com/charmbracelet/lipgloss" "github.com/muesli/termenv" v1 "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/app" "github.com/wagood...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/config.go
cmd/dive/cli/internal/ui/v1/config.go
package v1 import ( "errors" "fmt" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/key" "github.com/wagoodman/dive/dive/filetree" "github.com/wagoodman/dive/dive/image" "golang.org/x/net/context" "sync" ) type Config struct { // required input Analysis image.Analysis Content ContentReader Pre...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/app/job_control_unix.go
cmd/dive/cli/internal/ui/v1/app/job_control_unix.go
//go:build !windows // +build !windows package app import ( "syscall" "github.com/awesome-gocui/gocui" ) // handle ctrl+z func handle_ctrl_z(g *gocui.Gui, v *gocui.View) error { gocui.Suspend() if err := syscall.Kill(syscall.Getpid(), syscall.SIGSTOP); err != nil { return err } return gocui.Resume() }
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/app/controller.go
cmd/dive/cli/internal/ui/v1/app/controller.go
package app import ( "fmt" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/view" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/viewmodel" "golang.org/x/net/context" "regexp" "github.com/awesome-gocui/gocui" ) type controller struct { gui...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/app/job_control_other.go
cmd/dive/cli/internal/ui/v1/app/job_control_other.go
//go:build windows // +build windows package app import ( "github.com/awesome-gocui/gocui" ) // handle ctrl+z not supported on windows func handle_ctrl_z(_ *gocui.Gui, _ *gocui.View) error { return nil }
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/app/app.go
cmd/dive/cli/internal/ui/v1/app/app.go
package app import ( "errors" "github.com/awesome-gocui/gocui" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/key" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/layout" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/layout/compound"...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/key/binding.go
cmd/dive/cli/internal/ui/v1/key/binding.go
package key import ( "fmt" "github.com/awesome-gocui/gocui" "github.com/awesome-gocui/keybinding" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/format" ) type BindingInfo struct { Key gocui.Key Modifier gocui.Modifier Config Config OnAction func() error IsSelected func() bool Display...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/key/config.go
cmd/dive/cli/internal/ui/v1/key/config.go
package key import ( "fmt" "github.com/awesome-gocui/keybinding" ) type Config struct { Input string Keys []keybinding.Key `yaml:"-" mapstructure:"-"` } func (c *Config) Setup() error { if len(c.Input) == 0 { return nil } parsed, err := keybinding.ParseAll(c.Input) if err != nil { return fmt.Errorf("fa...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/viewmodel/filetree_test.go
cmd/dive/cli/internal/ui/v1/viewmodel/filetree_test.go
package viewmodel import ( "flag" "github.com/google/go-cmp/cmp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1" "go.uber.org/atomic" "os" "os/exec" "path/filepath" "regexp" "strings" "testing" "github.com/wagoodman/dive/d...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/viewmodel/config.go
cmd/dive/cli/internal/ui/v1/viewmodel/config.go
package viewmodel
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/viewmodel/layer_compare.go
cmd/dive/cli/internal/ui/v1/viewmodel/layer_compare.go
package viewmodel const ( CompareSingleLayer LayerCompareMode = iota CompareAllLayers ) type LayerCompareMode int
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/viewmodel/layer_selection.go
cmd/dive/cli/internal/ui/v1/viewmodel/layer_selection.go
package viewmodel import ( "github.com/wagoodman/dive/dive/image" ) type LayerSelection struct { Layer *image.Layer BottomTreeStart, BottomTreeStop, TopTreeStart, TopTreeStop int }
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/viewmodel/layer_set_state_test.go
cmd/dive/cli/internal/ui/v1/viewmodel/layer_set_state_test.go
package viewmodel import ( "testing" ) func TestGetCompareIndexes(t *testing.T) { tests := []struct { name string layerIndex int compareMode LayerCompareMode compareStartIndex int expected [4]int }{ { name: "LayerIndex equals CompareStartIndex", lay...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/viewmodel/filetree.go
cmd/dive/cli/internal/ui/v1/viewmodel/filetree.go
package viewmodel import ( "bytes" "fmt" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/format" "github.com/wagoodman/dive/internal/log" "regexp" "strings" "github.com/lunixbochs/vtclean" "github.com/wagoodman/dive/dive/filetree" ) // FileTreeV...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/viewmodel/layer_set_state.go
cmd/dive/cli/internal/ui/v1/viewmodel/layer_set_state.go
package viewmodel import "github.com/wagoodman/dive/dive/image" type LayerSetState struct { LayerIndex int Layers []*image.Layer CompareMode LayerCompareMode CompareStartIndex int } func NewLayerSetState(layers []*image.Layer, compareMode LayerCompareMode) *LayerSetState { return &LayerS...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/layout/manager_test.go
cmd/dive/cli/internal/ui/v1/layout/manager_test.go
package layout import ( "testing" "github.com/awesome-gocui/gocui" ) type testElement struct { t *testing.T size int layoutArea Area location Location } func newTestElement(t *testing.T, size int, layoutArea Area, location Location) *testElement { return &testElement{ t: t, size...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/layout/location.go
cmd/dive/cli/internal/ui/v1/layout/location.go
package layout const ( LocationFooter Location = iota LocationHeader LocationColumn ) type Location int
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/layout/layout.go
cmd/dive/cli/internal/ui/v1/layout/layout.go
package layout import "github.com/awesome-gocui/gocui" type Layout interface { Name() string Layout(g *gocui.Gui, minX, minY, maxX, maxY int) error RequestedSize(available int) *int IsVisible() bool OnLayoutChange() error }
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/layout/area.go
cmd/dive/cli/internal/ui/v1/layout/area.go
package layout type Area struct { minX, minY, maxX, maxY int }
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/layout/manager.go
cmd/dive/cli/internal/ui/v1/layout/manager.go
package layout import ( "fmt" "github.com/awesome-gocui/gocui" "github.com/wagoodman/dive/internal/log" ) type Constraint func(int) int type Manager struct { lastX, lastY int lastHeaderArea, lastFooterArea, lastColumnArea Area elements map...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/layout/compound/layer_details_column.go
cmd/dive/cli/internal/ui/v1/layout/compound/layer_details_column.go
package compound import ( "fmt" "github.com/awesome-gocui/gocui" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/view" "github.com/wagoodman/dive/internal/log" "github.com/wagoodman/dive/internal/utils" ) type LayerDetailsCompoundLayout struct { layer *view.Layer layerDetails *view....
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/view/renderer.go
cmd/dive/cli/internal/ui/v1/view/renderer.go
package view // Controller defines the a renderable terminal screen pane. type Renderer interface { Update() error Render() error IsVisible() bool } type Helper interface { KeyHelp() string }
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/view/status.go
cmd/dive/cli/internal/ui/v1/view/status.go
package view import ( "fmt" "github.com/anchore/go-logger" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/format" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/key" "github.com/wagoodman/dive/internal/log" "github.com/wagoodman/dive/internal/utils" "strings" "github.com/awesome-gocui/gocui" )...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/view/filter.go
cmd/dive/cli/internal/ui/v1/view/filter.go
package view import ( "fmt" "github.com/anchore/go-logger" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/format" "github.com/wagoodman/dive/internal/log" "github.com/wagoodman/dive/internal/utils" "strings" "github.com/awesome-gocui/gocui" ) type FilterEditListener func(string) error // Filter holds...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/view/views.go
cmd/dive/cli/internal/ui/v1/view/views.go
package view import ( "github.com/awesome-gocui/gocui" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1" ) type View interface { Setup(*gocui.View, *gocui.View) error Name() string IsVisible() bool } type Views struct { Tree *FileTree Layer *Layer Status *Status Filter *Filt...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/view/debug.go
cmd/dive/cli/internal/ui/v1/view/debug.go
package view import ( "fmt" "github.com/anchore/go-logger" "github.com/awesome-gocui/gocui" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/format" "github.com/wagoodman/dive/internal/log" "github.com/wagoodman/dive/internal/utils" ) // Debug is just for me :) type Debug struct { name string gui *...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/view/cursor.go
cmd/dive/cli/internal/ui/v1/view/cursor.go
package view import ( "errors" "github.com/awesome-gocui/gocui" ) // CursorDown moves the cursor down in the currently selected gocui pane, scrolling the screen as needed. func CursorDown(g *gocui.Gui, v *gocui.View) error { return CursorStep(g, v, 1) } // CursorUp moves the cursor up in the currently selected g...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/view/layer_change_listener.go
cmd/dive/cli/internal/ui/v1/view/layer_change_listener.go
package view import ( "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/viewmodel" ) type LayerChangeListener func(viewmodel.LayerSelection) error
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/view/layer.go
cmd/dive/cli/internal/ui/v1/view/layer.go
package view import ( "fmt" "github.com/anchore/go-logger" "github.com/awesome-gocui/gocui" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/format" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/key" "github.com/wagoodman/dive/cmd/dive/cli/i...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/view/image_details.go
cmd/dive/cli/internal/ui/v1/view/image_details.go
package view import ( "fmt" "github.com/anchore/go-logger" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/format" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/key" "github.com/wagoodman/dive/internal/log" "strconv" "strings" "github.com/awesome-gocui/gocui" "github.com/dustin/go-humanize" ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/view/layer_details.go
cmd/dive/cli/internal/ui/v1/view/layer_details.go
package view import ( "fmt" "github.com/anchore/go-logger" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/format" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/key" "github.com/wagoodman/dive/internal/log" "strings" "github.com/awesome-gocui/gocui" "github.com/dustin/go-humanize" "github.com...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/view/filetree.go
cmd/dive/cli/internal/ui/v1/view/filetree.go
package view import ( "fmt" "github.com/anchore/go-logger" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/format" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/key" "github.com/wagoodman/dive/cmd/dive/cli/internal/ui/v1/viewmodel" "github....
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/cmd/dive/cli/internal/ui/v1/format/format.go
cmd/dive/cli/internal/ui/v1/format/format.go
package format import ( "fmt" "strings" "github.com/fatih/color" "github.com/lunixbochs/vtclean" ) const ( // selectedLeftBracketStr = " " // selectedRightBracketStr = " " // selectedFillStr = " " // //leftBracketStr = "▏" //rightBracketStr = "▕" //fillStr = "─" // selectedLeftBracketStr = " " // selec...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/get_image_resolver.go
dive/get_image_resolver.go
package dive import ( "fmt" "strings" "github.com/wagoodman/dive/dive/image" "github.com/wagoodman/dive/dive/image/docker" "github.com/wagoodman/dive/dive/image/podman" ) const ( SourceUnknown ImageSource = iota SourceDockerEngine SourcePodmanEngine SourceDockerArchive ) type ImageSource int var ImageSour...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/resolver.go
dive/image/resolver.go
package image import "golang.org/x/net/context" type Resolver interface { Name() string Fetch(ctx context.Context, id string) (*Image, error) Build(ctx context.Context, options []string) (*Image, error) ContentReader } type ContentReader interface { Extract(ctx context.Context, id string, layer string, path str...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/image.go
dive/image/image.go
package image import ( "github.com/wagoodman/dive/dive/filetree" ) type Image struct { Request string Trees []*filetree.FileTree Layers []*Layer }
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/layer.go
dive/image/layer.go
package image import ( "fmt" "strings" "github.com/dustin/go-humanize" "github.com/wagoodman/dive/dive/filetree" ) const ( LayerFormat = "%7s %s" ) type Layer struct { Id string Index int Command string Size uint64 Tree *filetree.FileTree Names []string Digest string } func (l *Layer)...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/analysis.go
dive/image/analysis.go
package image import ( "context" "github.com/wagoodman/dive/dive/filetree" ) type Analysis struct { Image string Layers []*Layer RefTrees []*filetree.FileTree Efficiency float64 SizeBytes uint64 UserSizeByes uint64 // this is all bytes except for the base i...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/docker/manifest.go
dive/image/docker/manifest.go
package docker import ( "encoding/json" "fmt" ) type manifest struct { ConfigPath string `json:"Config"` RepoTags []string `json:"RepoTags"` LayerTarPaths []string `json:"Layers"` } func newManifest(manifestBytes []byte) manifest { var manifest []manifest err := json.Unmarshal(manifestBytes, &manife...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/docker/docker_host_windows.go
dive/image/docker/docker_host_windows.go
package docker const ( defaultDockerHost = "npipe:////.pipe/docker_engine" )
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/docker/docker_host_unix.go
dive/image/docker/docker_host_unix.go
//go:build !windows package docker const ( defaultDockerHost = "unix:///var/run/docker.sock" )
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/docker/config.go
dive/image/docker/config.go
package docker import ( "encoding/json" "fmt" ) type config struct { History []historyEntry `json:"history"` RootFs rootFs `json:"rootfs"` } type rootFs struct { Type string `json:"type"` DiffIds []string `json:"diff_ids"` } type historyEntry struct { ID string Size uint64 Creat...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/docker/build.go
dive/image/docker/build.go
package docker import ( "fmt" "path/filepath" "strings" "github.com/scylladb/go-set/strset" "github.com/spf13/afero" ) const ( defaultDockerfileName = "Dockerfile" defaultContainerfileName = "Containerfile" ) func buildImageFromCli(fs afero.Fs, buildArgs []string) (string, error) { iidfile, err := afero....
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/docker/cli.go
dive/image/docker/cli.go
package docker import ( "fmt" "github.com/wagoodman/dive/internal/log" "github.com/wagoodman/dive/internal/utils" "os" "os/exec" "strings" ) // runDockerCmd runs a given Docker command in the current tty func runDockerCmd(cmdStr string, args ...string) error { if !isDockerClientBinaryAvailable() { return fm...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/docker/image_archive.go
dive/image/docker/image_archive.go
package docker import ( "archive/tar" "bytes" "compress/gzip" "encoding/json" "fmt" "io" "os" "path" "path/filepath" "strings" "github.com/klauspost/compress/zstd" "github.com/wagoodman/dive/dive/filetree" "github.com/wagoodman/dive/dive/image" ) type ImageArchive struct { manifest manifest config ...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/docker/layer.go
dive/image/docker/layer.go
package docker import ( "strings" "github.com/wagoodman/dive/dive/filetree" "github.com/wagoodman/dive/dive/image" ) // Layer represents a Docker image layer and metadata type layer struct { history historyEntry index int tree *filetree.FileTree } // String represents a layer in a columnar format. func (...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/docker/engine_resolver.go
dive/image/docker/engine_resolver.go
package docker import ( "fmt" "github.com/spf13/afero" "github.com/wagoodman/dive/internal/bus/event/payload" "github.com/wagoodman/dive/internal/log" "io" "net/http" "os" "strings" cliconfig "github.com/docker/cli/cli/config" "github.com/docker/cli/cli/connhelper" ddocker "github.com/docker/cli/cli/contex...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/docker/testing.go
dive/image/docker/testing.go
package docker import ( "github.com/stretchr/testify/require" "golang.org/x/net/context" "os" "testing" "github.com/wagoodman/dive/dive/image" ) func TestLoadArchive(t testing.TB, tarPath string) (*ImageArchive, error) { t.Helper() f, err := os.Open(tarPath) if err != nil { return nil, err } defer f.Clos...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false
wagoodman/dive
https://github.com/wagoodman/dive/blob/d6c691947f8fda635c952a17ee3b7555379d58f0/dive/image/docker/image_archive_analysis_test.go
dive/image/docker/image_archive_analysis_test.go
package docker import ( "testing" ) func Test_Analysis(t *testing.T) { table := map[string]struct { efficiency float64 sizeBytes uint64 userSizeBytes uint64 wastedBytes uint64 wastedPercent float64 path string }{ "docker-image": {0.9844212134184309, 1220598, 66237, 32025, 0.4834911...
go
MIT
d6c691947f8fda635c952a17ee3b7555379d58f0
2026-01-07T08:35:43.531869Z
false