mirror of
https://github.com/containers/skopeo.git
synced 2025-09-20 17:38:25 +00:00
@@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
@@ -29,9 +30,8 @@ type signingSuite struct {
|
|||||||
var _ = suite.SetupAllSuite(&signingSuite{})
|
var _ = suite.SetupAllSuite(&signingSuite{})
|
||||||
|
|
||||||
func findFingerprint(lineBytes []byte) (string, error) {
|
func findFingerprint(lineBytes []byte) (string, error) {
|
||||||
lines := string(lineBytes)
|
for line := range bytes.SplitSeq(lineBytes, []byte{'\n'}) {
|
||||||
for _, line := range strings.Split(lines, "\n") {
|
fields := strings.Split(string(line), ":")
|
||||||
fields := strings.Split(line, ":")
|
|
||||||
if len(fields) >= 10 && fields[0] == "fpr" {
|
if len(fields) >= 10 && fields[0] == "fpr" {
|
||||||
return fields[9], nil
|
return fields[9], nil
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user