Fix tmpfs issues, add swapping of options, etc
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
@ -8,19 +8,11 @@ import (
|
||||
"github.com/blakesmith/ar"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func InspectPackage(filename string) (string, error) {
|
||||
f, err := os.Open(filename)
|
||||
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("error opening package file %s: %s", filename, err)
|
||||
}
|
||||
|
||||
arReader := ar.NewReader(f)
|
||||
defer f.Close()
|
||||
func InspectPackage(r io.Reader) (string, error) {
|
||||
arReader := ar.NewReader(r)
|
||||
|
||||
for {
|
||||
header, err := arReader.Next()
|
||||
@ -37,6 +29,7 @@ func InspectPackage(filename string) (string, error) {
|
||||
return InspectPackageControl(arReader)
|
||||
}
|
||||
}
|
||||
|
||||
return "", nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user