mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-02 04:50:49 +00:00
Enable goconst & interfacer linters
This commit is contained in:
+8
-2
@@ -14,12 +14,18 @@ import (
|
||||
"github.com/mkrautz/goar"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/smira/aptly/aptly"
|
||||
"github.com/smira/aptly/utils"
|
||||
"github.com/smira/go-xz"
|
||||
"github.com/smira/lzma"
|
||||
)
|
||||
|
||||
// Source kinds
|
||||
const (
|
||||
SourceSnapshot = "snapshot"
|
||||
SourceLocalRepo = "local"
|
||||
SourceRemoteRepo = "repo"
|
||||
)
|
||||
|
||||
// GetControlFileFromDeb reads control file from deb package
|
||||
func GetControlFileFromDeb(packageFile string) (Stanza, error) {
|
||||
file, err := os.Open(packageFile)
|
||||
@@ -107,7 +113,7 @@ func GetControlFileFromDsc(dscFile string, verifier utils.Verifier) (Stanza, err
|
||||
}
|
||||
|
||||
// GetContentsFromDeb returns list of files installed by .deb package
|
||||
func GetContentsFromDeb(file aptly.ReadSeekerCloser, packageFile string) ([]string, error) {
|
||||
func GetContentsFromDeb(file io.Reader, packageFile string) ([]string, error) {
|
||||
library := ar.NewReader(file)
|
||||
for {
|
||||
header, err := library.Next()
|
||||
|
||||
Reference in New Issue
Block a user