Skip to content

Commit f54e354

Browse files
authored
fix: fix codacy issues (#2)
1 parent 02ea5e1 commit f54e354

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

consts.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ const (
101101
// GeometryPolyline is the geometry polyline type.
102102
GeometryPolyline Geometry = "polyline"
103103

104-
// GeometryPolyline is the geometry polyline6 type.
104+
// GeometryPolyline6 is the geometry polyline6 type.
105105
GeometryPolyline6 Geometry = "polyline6"
106106

107-
// GeometryPolyline is the geometry geojson type.
107+
// GeometryGeoJSON is the geometry geojson type.
108108
GeometryGeoJSON Geometry = "geojson"
109109
)
110110

@@ -163,7 +163,7 @@ const (
163163
// AnnotationsDataSources is data sources annotations.
164164
AnnotationsDataSources Annotations = "datasources"
165165

166-
// AnnotationsDurationSpeed is duration and distance annotations.
166+
// AnnotationsDurationDistance is duration and distance annotations.
167167
AnnotationsDurationDistance Annotations = "duration,distance"
168168
)
169169

nearest.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type NearestResponse struct {
1515
Waypoints []NearestWaypoint `json:"waypoints"`
1616
}
1717

18-
// Nearset snaps a coordinate to the street network and returns the nearest n matches.
18+
// Nearest snaps a coordinate to the street network and returns the nearest n matches.
1919
func Nearest(ctx context.Context, osrm OSRMClient, req Request, opts ...Option) (*NearestResponse, error) {
2020
u := req.buildURLPath(*osrm.baseURL, nearestServiceURL)
2121

options.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func WithSteps(steps bool) Option {
5454

5555
// WithAnnotations makes OSRM to return additional metadata for each coordinate along the route geometry.
5656
// Can be used in route, match and trip services.
57-
func WithAnnotations(annotations Annotations) optionImpl {
57+
func WithAnnotations(annotations Annotations) Option {
5858
return optionImpl(func(u *url.URL) {
5959
setQueryParam(u, "annotations", string(annotations))
6060
})
@@ -155,7 +155,7 @@ func WithGaps(gaps Gaps) Option {
155155
})
156156
}
157157

158-
// Withtidy allows the input track modification to obtain better matching quality for noisy tracks.
158+
// WithTidy allows the input track modification to obtain better matching quality for noisy tracks.
159159
// Can be used in match service.
160160
func WithTidy(tidy bool) Option {
161161
return optionImpl(func(u *url.URL) {
@@ -216,7 +216,7 @@ func WithCustomOption(option, value string) Option {
216216
})
217217
}
218218

219-
// WithBearing limits the search to segments with given bearing in degrees towards true north in a clockwise direction.
219+
// WithBearings limits the search to segments with given bearing in degrees towards true north in a clockwise direction.
220220
// It's a general option and can be used in all services.
221221
func WithBearings(bearings []Bearing) Option {
222222
return optionImpl(func(u *url.URL) {

types.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ type (
240240
Steps []RouteStep[T] `json:"steps"`
241241
}
242242

243-
// Route represents a route through (potentially multiple) waypoints.
243+
// RouteType represents a route through (potentially multiple) waypoints.
244244
RouteType[T GeometryType] struct {
245245
// Distance is the distance traveled by the route, in meters.
246246
Distance float32 `json:"distance"`

0 commit comments

Comments
 (0)