diff options
Diffstat (limited to 'adjust.go')
-rw-r--r-- | adjust.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 { |