1
0
Fork 0
mirror of https://github.com/vbatts/sl-feeds.git synced 2024-11-22 07:45:39 +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" "path/filepath"
"time" "time"
"../../changelog"
"../../fetch"
"github.com/BurntSushi/toml" "github.com/BurntSushi/toml"
"github.com/urfave/cli" "github.com/urfave/cli"
"github.com/vbatts/sl-feeds/changelog"
"github.com/vbatts/sl-feeds/fetch"
) )
func main() { func main() {
@ -164,11 +164,14 @@ func main() {
app.Run(os.Args) 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 { type Config struct {
Dest string Dest string
Mirrors []Mirror Mirrors []Mirror
} }
// Mirror is where the release/ChangeLog.txt will be fetched from
type Mirror struct { type Mirror struct {
URL string URL string
Releases []string Releases []string

View file

@ -5,7 +5,7 @@ import (
"net/http" "net/http"
"time" "time"
"../changelog" "github.com/vbatts/sl-feeds/changelog"
) )
// Repo represents a remote slackware software repo // 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) { if mtime.After(than) {
return r.ChangeLog() 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 // ErrNotNewer 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") var ErrNotNewer = fmt.Errorf("Remote file is not newer than provided time")
// ChangeLog fetches the ChangeLog.txt for this remote Repo, along with the // ChangeLog fetches the ChangeLog.txt for this remote Repo, along with the
// last-modified (for comparisons). // last-modified (for comparisons).