summaryrefslogtreecommitdiffhomepage
path: root/clientupdate/clientupdate_downloads.go
blob: 9458f88fe8a18429faf5a44afe09ab735c8747ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause

//go:build (linux && !android) || windows

package clientupdate

import (
	"context"

	"tailscale.com/clientupdate/distsign"
)

func (up *Updater) downloadURLToFile(pathSrc, fileDst string) (ret error) {
	c, err := distsign.NewClient(up.Logf, up.PkgsAddr)
	if err != nil {
		return err
	}
	return c.Download(context.Background(), pathSrc, fileDst)
}