Skip to content
Myr

refactor: remove unused max func (#1537)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by sunnyraindy · committed by GitHub · parent 6984782 · Browse files · 2 files+0 added−14 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: sunnyraindy <sunnyraindy@outlook.com>

Diff stats

2 files+0 added−14 removed

  • other:+0 added−14 removed

2 files+0 added−14 removed

modified:examples/package-manager/main.go-7 removed
123 unmodified lines
124 return installedPkgMsg(pkg)125 })126}127128func max(a, b int) int {129 if a > b {130 return a131 }132 return b133}134128func main() {129 if _, err := tea.NewProgram(newModel()).Run(); err != nil {130 fmt.Println("Error running program:", err)131 os.Exit(1)
2 unmodified lines
modified:examples/pager/main.go-7 removed
94 unmodified lines
95 line := strings.Repeat("─", max(0, m.viewport.Width-lipgloss.Width(info)))96 return lipgloss.JoinHorizontal(lipgloss.Center, line, info)97}9899func max(a, b int) int {100 if a > b {101 return a102 }103 return b104}10599func main() {100 // Load some text for our viewport101 content, err := os.ReadFile("artichoke.md")102 if err != nil {
15 unmodified lines