hashicorp / go-getter

Package for downloading things from a string URL using a variety of protocols.
Mozilla Public License 2.0
1.65k stars 232 forks source link

What is The Diff of v2 to v1 #461

Open gastraight opened 11 months ago

gastraight commented 11 months ago

Hi! Please. What is the principal difference for v2 against v1 (in terms of public api) Is extracting a Request from a Client entity the main (only) change? What critical points should be considered for migration steps? Except for cmd/main maybe is there any other examples to disclose the diff?

Thanks

gastraight commented 11 months ago

And would for v1 getter.Detect() in v2 be an equivalent to iterate over client getters?

for _, getter := range client.Getters {
    ok, err := getter.Detect(req)
    if ok || err != nil {
       return  req.Src, ok, err
    }
}
 return  req.Src, false, nil