more work on porting command parsing to Go

This commit is contained in:
Kovid Goyal
2022-08-30 20:30:25 +05:30
parent 6f4968305a
commit a4b2e2a196
7 changed files with 29 additions and 12 deletions

View File

@@ -8,8 +8,8 @@ import (
"strings"
)
func parse_scroll_amount(amt string) ([2]interface{}, error) {
var ans [2]interface{}
func parse_scroll_amount(amt string) ([]interface{}, error) {
var ans = make([]interface{}, 2)
if amt == "start" || amt == "end" {
ans[0] = amt
ans[1] = nil