vet/internal/ui/ui.go
abhisek e6f6288701
feat: Code analysis framework infra
feat: Building code graph

Refactor to support import processing

Handle relative import name fixup

Add docs for code analysis framework

Update docs to include additional examples

feat: Function call graph

Update code graph to link function decl and calls

Include call node in function calls

feat: Flatten vulnerabilities in CSV reporter

refactor: Maintain separation of concerns for code analysis framework

refactor: Separate storage entities in its own package

feat: Add callback support in code graph builder

docs: Fix code analysis framework docs
Signed-off-by: abhisek <abhisek.datta@gmail.com>
2024-07-11 15:09:11 +05:30

33 lines
658 B
Go

package ui
import (
"fmt"
"os"
"github.com/jedib0t/go-pretty/v6/text"
)
func PrintBanner(s string) {
fmt.Fprintf(os.Stderr, s)
}
func PrintSuccess(s string, args ...any) {
msg := fmt.Sprintf(s, args...)
fmt.Fprint(os.Stderr, text.FgGreen.Sprint(msg), "\n")
}
func PrintMsg(s string, args ...any) {
msg := fmt.Sprintf(s, args...)
fmt.Fprint(os.Stderr, text.Bold.Sprint(msg), "\n")
}
func PrintWarning(s string, args ...any) {
msg := fmt.Sprintf(s, args...)
fmt.Fprint(os.Stdout, text.FgYellow.Sprint(msg), "\n")
}
func PrintError(s string, args ...any) {
msg := fmt.Sprintf(s, args...)
fmt.Fprint(os.Stderr, text.FgRed.Sprint(msg), "\n")
}