1
0
Fork 0
mirror of https://github.com/vbatts/sl-feeds.git synced 2024-11-21 15:25:41 +00:00

*: golint and change import paths

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-02-05 16:38:40 -05:00
parent 25fc064194
commit fc518b86c5
2 changed files with 9 additions and 6 deletions

View file

@ -8,10 +8,10 @@ import (
"path/filepath"
"time"
"../../changelog"
"../../fetch"
"github.com/BurntSushi/toml"
"github.com/urfave/cli"
"github.com/vbatts/sl-feeds/changelog"
"github.com/vbatts/sl-feeds/fetch"
)
func main() {
@ -164,11 +164,14 @@ func main() {
app.Run(os.Args)
}
// Config is read in to point to where RSS are written to, and the Mirrors to
// be fetched from
type Config struct {
Dest string
Mirrors []Mirror
}
// Mirror is where the release/ChangeLog.txt will be fetched from
type Mirror struct {
URL string
Releases []string

View file

@ -5,7 +5,7 @@ import (
"net/http"
"time"
"../changelog"
"github.com/vbatts/sl-feeds/changelog"
)
// Repo represents a remote slackware software repo
@ -42,11 +42,11 @@ func (r Repo) NewerChangeLog(than time.Time) (e []changelog.Entry, mtime time.Ti
if mtime.After(than) {
return r.ChangeLog()
}
return nil, time.Unix(0, 0), NotNewer
return nil, time.Unix(0, 0), ErrNotNewer
}
// NotNewer is a status error usage to indicate that the remote file is not newer
var NotNewer = fmt.Errorf("Remote file is not newer than provided time")
// ErrNotNewer is a status error usage to indicate that the remote file is not newer
var ErrNotNewer = fmt.Errorf("Remote file is not newer than provided time")
// ChangeLog fetches the ChangeLog.txt for this remote Repo, along with the
// last-modified (for comparisons).