mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 15:43:21 +00:00
build.go: Update for rest-server
This commit is contained in:
parent
fbac61c6cb
commit
e591a330e5
1 changed files with 3 additions and 3 deletions
6
build.go
6
build.go
|
@ -65,7 +65,7 @@ func excludePath(name string) bool {
|
||||||
// updateGopath builds a valid GOPATH at dst, with all Go files in src/ copied
|
// updateGopath builds a valid GOPATH at dst, with all Go files in src/ copied
|
||||||
// to dst/prefix/, so calling
|
// to dst/prefix/, so calling
|
||||||
//
|
//
|
||||||
// updateGopath("/tmp/gopath", "/home/u/restic", "github.com/restic/restic")
|
// updateGopath("/tmp/gopath", "/home/u/rest-server", "github.com/restic/rest-server")
|
||||||
//
|
//
|
||||||
// with "/home/u/restic" containing the file "foo.go" yields the following tree
|
// with "/home/u/restic" containing the file "foo.go" yields the following tree
|
||||||
// at "/tmp/gopath":
|
// at "/tmp/gopath":
|
||||||
|
@ -74,7 +74,7 @@ func excludePath(name string) bool {
|
||||||
// └── src
|
// └── src
|
||||||
// └── github.com
|
// └── github.com
|
||||||
// └── restic
|
// └── restic
|
||||||
// └── restic
|
// └── rest-server
|
||||||
// └── foo.go
|
// └── foo.go
|
||||||
func updateGopath(dst, src, prefix string) error {
|
func updateGopath(dst, src, prefix string) error {
|
||||||
return filepath.Walk(src, func(name string, fi os.FileInfo, err error) error {
|
return filepath.Walk(src, func(name string, fi os.FileInfo, err error) error {
|
||||||
|
@ -292,7 +292,7 @@ func (cs Constants) LDFlags() string {
|
||||||
func main() {
|
func main() {
|
||||||
ver := runtime.Version()
|
ver := runtime.Version()
|
||||||
if strings.HasPrefix(ver, "go1") && ver < "go1.7" {
|
if strings.HasPrefix(ver, "go1") && ver < "go1.7" {
|
||||||
fmt.Fprintf(os.Stderr, "Go version %s detected, restic requires at least Go 1.7\n", ver)
|
fmt.Fprintf(os.Stderr, "Go version %s detected, rest-server requires at least Go 1.7\n", ver)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue