Stéphane Graber c43c070130
Allow full templating in AptSources
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2018-03-15 00:14:15 -04:00

27 lines
540 B
Go

package sources
import "github.com/lxc/distrobuilder/shared"
// A Downloader represents a source downloader.
type Downloader interface {
Run(shared.Definition, string, string, string) error
}
// Get returns a Downloader.
func Get(name string) Downloader {
switch name {
case "ubuntu-http":
return NewUbuntuHTTP()
case "debootstrap":
return NewDebootstrap()
case "archlinux-http":
return NewArchLinuxHTTP()
case "centos-http":
return NewCentOSHTTP()
case "alpinelinux-http":
return NewAlpineLinuxHTTP()
}
return nil
}