2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 00:39:32 +08:00
Files
panel/internal/data/helper.go

17 lines
304 B
Go

package data
import (
"fmt"
"github.com/moby/moby/client"
)
func getDockerClient(sock string) (*client.Client, error) {
apiClient, err := client.New(client.WithHost(fmt.Sprintf("unix://%s", sock)), client.WithAPIVersionNegotiation())
if err != nil {
return nil, err
}
return apiClient, nil
}