From b93dea2e1c18752b89b09790b390e54c33dda1bf Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 22 Mar 2018 23:03:36 +0200 Subject: Refactoring and documentation --- ui/widget/border.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ui/widget/border.go') diff --git a/ui/widget/border.go b/ui/widget/border.go index a32f4dd..7c42f3d 100644 --- a/ui/widget/border.go +++ b/ui/widget/border.go @@ -21,10 +21,16 @@ import ( "maunium.net/go/tview" ) +// Border is a simple tview widget that renders a horizontal or vertical bar. +// +// If the width of the box is 1, the bar will be vertical. +// If the height is 1, the bar will be horizontal. +// If the width nor the height are 1, nothing will be rendered. type Border struct { *tview.Box } +// NewBorder wraps a new tview Box into a new Border. func NewBorder() *Border { return &Border{tview.NewBox()} } -- cgit v1.2.3