2019-12-03 22:51:03 +00:00
|
|
|
package output
|
|
|
|
|
|
|
|
import (
|
2019-12-03 23:10:42 +00:00
|
|
|
"flag"
|
2019-12-03 22:51:03 +00:00
|
|
|
"github.com/fatih/color"
|
|
|
|
)
|
|
|
|
|
2019-12-03 23:10:42 +00:00
|
|
|
var (
|
|
|
|
fullOutput *bool
|
2019-12-03 22:51:03 +00:00
|
|
|
)
|
|
|
|
|
2019-12-03 23:10:42 +00:00
|
|
|
func RegisterFlags() {
|
|
|
|
fullOutput = flag.Bool("full-output", false, "Show full output instead of limiting submodule output")
|
2019-12-03 22:51:03 +00:00
|
|
|
}
|
|
|
|
|
2019-12-03 23:10:42 +00:00
|
|
|
// Called at the very end, before terminating pancap
|
|
|
|
func Finalize() {
|
|
|
|
// Check if we snipped, to add a notice how to show the whole block
|
|
|
|
if DidSnip {
|
|
|
|
// We snipped - inform user about this process
|
|
|
|
printer := color.New(color.Bold, color.BgBlack)
|
|
|
|
printer.Print("\nOutput is snipped at one or more positions. Add --full-output to avoid snipping.")
|
2019-12-03 22:51:03 +00:00
|
|
|
}
|
2019-12-03 23:10:42 +00:00
|
|
|
}
|