mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-15 07:57:07 +08:00
lint: apply x/tools/modernize fixes
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
@ -24,11 +24,11 @@ func (w *writer) Write(status *client.SolveStatus) {
|
||||
|
||||
func (w *writer) WriteBuildRef(target string, ref string) {}
|
||||
|
||||
func (w *writer) ValidateLogSource(digest.Digest, interface{}) bool {
|
||||
func (w *writer) ValidateLogSource(digest.Digest, any) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (w *writer) ClearLogSource(interface{}) {}
|
||||
func (w *writer) ClearLogSource(any) {}
|
||||
|
||||
func ToControlStatus(s *client.SolveStatus) *StatusResponse {
|
||||
resp := StatusResponse{}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package pb
|
||||
|
||||
import (
|
||||
"slices"
|
||||
|
||||
"github.com/moby/buildkit/session"
|
||||
"github.com/moby/buildkit/session/sshforward/sshprovider"
|
||||
)
|
||||
@ -10,7 +12,7 @@ func CreateSSH(ssh []*SSH) (session.Attachable, error) {
|
||||
for _, ssh := range ssh {
|
||||
cfg := sshprovider.AgentConfig{
|
||||
ID: ssh.ID,
|
||||
Paths: append([]string{}, ssh.Paths...),
|
||||
Paths: slices.Clone(ssh.Paths),
|
||||
}
|
||||
configs = append(configs, cfg)
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ func serveCmd(dockerCli command.Cli) *cobra.Command {
|
||||
return err
|
||||
}
|
||||
pidF := filepath.Join(root, defaultPIDFilename)
|
||||
if err := os.WriteFile(pidF, []byte(fmt.Sprintf("%d", os.Getpid())), 0600); err != nil {
|
||||
if err := os.WriteFile(pidF, fmt.Appendf(nil, "%d", os.Getpid()), 0600); err != nil {
|
||||
return err
|
||||
}
|
||||
defer func() {
|
||||
|
Reference in New Issue
Block a user