From ba7d1648d27fb4dc7309003b81f68dbf3d5bf945 Mon Sep 17 00:00:00 2001 From: mimoham24 <69579255+mimoham24@users.noreply.github.com> Date: Fri, 16 Jul 2021 10:58:19 +0300 Subject: [PATCH] fix: replace strings.Split() with strings.field() (#25) --- pkg/layer/decoding/kml.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/layer/decoding/kml.go b/pkg/layer/decoding/kml.go index 8ccb4218..07f701d8 100644 --- a/pkg/layer/decoding/kml.go +++ b/pkg/layer/decoding/kml.go @@ -51,7 +51,7 @@ func coordinatesToLatLngHeight(c string) (*property.LatLng, float64, error) { func coordinatesToLatLngHeightList(c string) ([]property.LatLngHeight, error) { var LatLngHeighList []property.LatLngHeight - coords := strings.Split(c, "\n") + coords := strings.Fields(c) for _, llh := range coords { reg, err := regexp.Compile(`\s+`) if err != nil {