aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/menu.go4
-rw-r--r--config/menu_test.go5
2 files changed, 3 insertions, 6 deletions
diff --git a/config/menu.go b/config/menu.go
index a442036..f405ec5 100644
--- a/config/menu.go
+++ b/config/menu.go
@@ -39,11 +39,11 @@ func (m *Menu) validate(name string) error {
}
// Banner is just any string, nothing to validate
// XOffset
- if m.XOffset <= 0 {
+ if m.XOffset < 0 {
return errors.New("XOffset must be a positive integer")
}
// YOffset
- if m.YOffset <= 0 {
+ if m.YOffset < 0 {
return errors.New("YOffset must be a positive integer")
}
// MenuEntries
diff --git a/config/menu_test.go b/config/menu_test.go
index d0b1805..095b699 100644
--- a/config/menu_test.go
+++ b/config/menu_test.go
@@ -18,10 +18,7 @@ func TestMenuValidate(t *testing.T) {
t.Fatal("Negative XOffset should not be valid")
}
// YOffset
- menu = Menu{
- XOffset: 1,
- YOffset: -1,
- }
+ menu = Menu{YOffset: -1}
if err := menu.validate("test"); err == nil {
t.Fatal("Negative YOffset should not be valid")
}