summaryrefslogtreecommitdiff
path: root/adjust.go
diff options
context:
space:
mode:
Diffstat (limited to 'adjust.go')
-rw-r--r--adjust.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/adjust.go b/adjust.go
index e06d4f6..28b62cc 100644
--- a/adjust.go
+++ b/adjust.go
@@ -12,7 +12,6 @@
package excelize
import (
- "errors"
"strings"
)
@@ -219,7 +218,7 @@ func areaRangeToCoordinates(firstCell, lastCell string) ([]int, error) {
// correct C1:B3 to B1:C3.
func sortCoordinates(coordinates []int) error {
if len(coordinates) != 4 {
- return errors.New("coordinates length must be 4")
+ return ErrCoordinates
}
if coordinates[2] < coordinates[0] {
coordinates[2], coordinates[0] = coordinates[0], coordinates[2]
@@ -234,7 +233,7 @@ func sortCoordinates(coordinates []int) error {
// to area reference.
func (f *File) coordinatesToAreaRef(coordinates []int) (string, error) {
if len(coordinates) != 4 {
- return "", errors.New("coordinates length must be 4")
+ return "", ErrCoordinates
}
firstCell, err := CoordinatesToCellName(coordinates[0], coordinates[1])
if err != nil {