diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2019-12-03 17:16:13 +0000 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2019-12-03 17:16:13 +0000 |
commit | bf2456f380a7d21677d0c0cf116cc2cbb37bcc14 (patch) | |
tree | 1052f50ad2951feeee268f5df8fc5f0cfe894ae6 /coords.go | |
parent | 30d510fc62ed7aec90820835926a784744c51d7f (diff) |
temp switch back to exported colstream
Diffstat (limited to 'coords.go')
-rw-r--r-- | coords.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -16,22 +16,22 @@ const ( // ColAlpha returns an alpha representation of a column index. // index is an integer - ColAlpha(0) returns "A", etc. func ColIndexToAlpha(index int) (string, error) { - max := len(colstream) - 1 + max := len(Colstream) - 1 if index <= max { - return colstream[index], nil + return Colstream[index], nil } else { msg := fmt.Sprintf("cannot have more than %d columns", max) return "", errors.New(msg) } } -var colstream = cols(maxAlphabets) +var Colstream = cols(maxAlphabets) // ColLettersToIndex converts an alpha column // reference to a zero-based numeric column identifier. func ColAlphaToIndex(letters string) (int, error) { - max := len(colstream) - 1 - for i, v := range colstream { + max := len(Colstream) - 1 + for i, v := range Colstream { if i > max { msg := fmt.Sprintf("Cannot exceed maximum of %d", max) return 0, errors.New(msg) |