style: address linter complaints
3 files changed, 8 insertions(+), 8 deletions(-)
M internal/config/config.go → internal/config/config.go
@@ -21,7 +21,7 @@ *url.URL } func (u *URL) MarshalText() ([]byte, error) { - return []byte(u.URL.String()), nil + return []byte(u.String()), nil } func (u *URL) UnmarshalText(text []byte) (err error) {@@ -49,7 +49,7 @@ time.Duration } func (d *Duration) MarshalText() ([]byte, error) { - return []byte(d.Duration.String()), nil + return []byte(d.String()), nil } func (d *Duration) UnmarshalText(text []byte) (err error) {
M internal/index/index_meta.go → internal/index/index_meta.go
@@ -104,7 +104,7 @@ return nil } func (i *Meta) GetSourceMeta(source string) *SourceMeta { - sourceMeta := i.data.Sources[source] + sourceMeta := i.Sources[source] if sourceMeta == nil { return &SourceMeta{} }@@ -113,15 +113,15 @@ return sourceMeta } func (i *Meta) SetSourceMeta(source string, meta *SourceMeta) { - if i.data.Sources == nil { - i.data.Sources = make(map[string]*SourceMeta) + if i.Sources == nil { + i.Sources = make(map[string]*SourceMeta) } - i.data.Sources[source] = meta + i.Sources[source] = meta } func (i *Meta) LastUpdated() time.Time { var last time.Time - for _, sourceMeta := range i.data.Sources { + for _, sourceMeta := range i.Sources { if sourceMeta.Updated.After(last) { last = sourceMeta.Updated }
M internal/server/mux.go → internal/server/mux.go
@@ -102,7 +102,7 @@ return } - var pageSize int = search.DefaultPageSize + var pageSize = search.DefaultPageSize var pageNumber = 1 if pg := r.URL.Query().Get("page"); pg != "" { pageNumber, err = strconv.Atoi(pg)