mirror of
https://github.com/vbatts/sl-feeds.git
synced 2024-11-15 20:58:38 +00:00
*: golint
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
e646c9daef
commit
c5585b2c1d
2 changed files with 5 additions and 0 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"../changelog"
|
||||
)
|
||||
|
||||
// Repo represents a remote slackware software repo
|
||||
type Repo struct {
|
||||
URL string
|
||||
}
|
||||
|
@ -16,6 +17,8 @@ func (r Repo) get(file string) (*http.Response, error) {
|
|||
return http.Get(r.URL + "/" + file)
|
||||
}
|
||||
|
||||
// ChangeLog fetches the ChangeLog.txt for this remote Repo, along with the
|
||||
// last-modified (for comparisons).
|
||||
func (r Repo) ChangeLog() (e []changelog.Entry, mtime time.Time, err error) {
|
||||
resp, err := r.get("ChangeLog.txt")
|
||||
if err != nil {
|
||||
|
|
|
@ -5,6 +5,8 @@ import (
|
|||
"path/filepath"
|
||||
)
|
||||
|
||||
// FindFiles is a convenience for walk a directory tree for a particular file
|
||||
// name.
|
||||
func FindFiles(root, name string) (paths []string, err error) {
|
||||
paths = []string{}
|
||||
err = filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
|
||||
|
|
Loading…
Reference in a new issue