Remove `RemoveFilesAndConnections`

The `RemoveFilesAndConnections` function is not being used, so its safe
to remove it and not carry unnecessary code that we need to maintain.

Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
This commit is contained in:
Jake Correnti 2024-09-12 14:40:24 -04:00
parent 54b71b637c
commit e041f2a7b7
1 changed files with 0 additions and 14 deletions

View File

@ -7,10 +7,8 @@ import (
"fmt"
"net"
"net/url"
"os"
"github.com/containers/common/pkg/config"
"github.com/sirupsen/logrus"
)
const LocalhostIP = "127.0.0.1"
@ -106,18 +104,6 @@ func RemoveConnections(names ...string) error {
})
}
// removeFilesAndConnections removes any files and connections with the given names
func RemoveFilesAndConnections(files []string, names ...string) {
for _, f := range files {
if err := os.Remove(f); err != nil && !errors.Is(err, os.ErrNotExist) {
logrus.Error(err)
}
}
if err := RemoveConnections(names...); err != nil {
logrus.Error(err)
}
}
// makeSSHURL creates a URL from the given input
func makeSSHURL(host, path, port, userName string) *url.URL {
var hostname string