mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
Merge pull request #18931 from vrothberg/lint
bump golangci-lint to v1.53.3
This commit is contained in:
@ -106,7 +106,7 @@ func add(cmd *cobra.Command, args []string) error {
|
||||
Default: cOpts.Default,
|
||||
}
|
||||
dest := args[1]
|
||||
if match, err := regexp.Match("^[A-Za-z][A-Za-z0-9+.-]*://", []byte(dest)); err != nil {
|
||||
if match, err := regexp.MatchString("^[A-Za-z][A-Za-z0-9+.-]*://", dest); err != nil {
|
||||
return fmt.Errorf("invalid destination: %w", err)
|
||||
} else if !match {
|
||||
dest = "ssh://" + dest
|
||||
@ -203,7 +203,7 @@ func create(cmd *cobra.Command, args []string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if match, err := regexp.Match("^[A-Za-z][A-Za-z0-9+.-]*://", []byte(dest)); err != nil {
|
||||
if match, err := regexp.MatchString("^[A-Za-z][A-Za-z0-9+.-]*://", dest); err != nil {
|
||||
return fmt.Errorf("invalid destination: %w", err)
|
||||
} else if !match {
|
||||
dest = "ssh://" + dest
|
||||
|
@ -64,7 +64,7 @@ func logToKmsg(s string) bool {
|
||||
kmsgFile = f
|
||||
}
|
||||
|
||||
if _, err := kmsgFile.Write([]byte(s)); err != nil {
|
||||
if _, err := kmsgFile.WriteString(s); err != nil {
|
||||
kmsgFile.Close()
|
||||
kmsgFile = nil
|
||||
return false
|
||||
|
Reference in New Issue
Block a user