INNER CODE UNIT · Go
NewMisconfigMapper
intigriti/misconfig-mapper · internal/service/service.go:23
func NewMisconfigMapper(cfg *config.Config) *MisconfigMapper {
return &MisconfigMapper{
Config: cfg,
Templates: templates.NewManager(cfg.TemplatesPath, cfg.Verbosity),
}
}
// GetTerminalWidth returns the width of the terminal
func (m *MisconfigMapper) GetTerminalWidth() int {
fd := int(os.Stdout.Fd())
width, _, _ := term.GetSize(fd)
if width <= 0 {
width = 80 // Default width
}
return width
}
// Run executes the main application logic