MCPcopy
hub / github.com/hashicorp/go-getter / Get

Function Get

get.go:104–111  ·  view source on GitHub ↗

Get downloads the directory specified by src into the folder specified by dst. If dst already exists, Get will attempt to update it. src is a URL, whereas dst is always just a file path to a folder. This folder doesn't need to exist. It will be created if it doesn't exist.

(ctx context.Context, dst, src string)

Source from the content-addressed store, hash-verified

102// src is a URL, whereas dst is always just a file path to a folder. This
103// folder doesn't need to exist. It will be created if it doesn't exist.
104func Get(ctx context.Context, dst, src string) (*GetResult, error) {
105 req := &Request{
106 Src: src,
107 Dst: dst,
108 GetMode: ModeDir,
109 }
110 return DefaultClient.Get(ctx, req)
111}
112
113// GetAny downloads a URL into the given destination. Unlike Get or
114// GetFile, both directories and files are supported.

Callers 11

TestGet_badSchemaFunction · 0.85
TestGet_fileFunction · 0.85
TestGet_filePercent2FFunction · 0.85
TestGet_fileForcedFunction · 0.85
TestGet_fileSubdirFunction · 0.85
TestGet_archiveFunction · 0.85
TestGet_archiveRootedFunction · 0.85
GetMethod · 0.85

Calls 1

GetMethod · 0.65

Tested by 10

TestGet_badSchemaFunction · 0.68
TestGet_fileFunction · 0.68
TestGet_filePercent2FFunction · 0.68
TestGet_fileForcedFunction · 0.68
TestGet_fileSubdirFunction · 0.68
TestGet_archiveFunction · 0.68
TestGet_archiveRootedFunction · 0.68