diff --git a/fetch/fetch.go b/fetch/fetch.go index 6d7f54c..11bd238 100644 --- a/fetch/fetch.go +++ b/fetch/fetch.go @@ -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 { diff --git a/util/find.go b/util/find.go index 025d4c0..82c1ec3 100644 --- a/util/find.go +++ b/util/find.go @@ -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 {