Migrate to dep 0.4

This commit is contained in:
Ludovic Fernandez 2018-02-07 23:30:05 +01:00 committed by Traefiker
parent dbd173b4e4
commit 7b19cb5631
255 changed files with 2233 additions and 35153 deletions

View file

@ -1,31 +0,0 @@
package main
import (
"time"
"github.com/Sirupsen/logrus"
"github.com/rancher/go-rancher-metadata/metadata"
)
const (
metadataUrl = "http://rancher-metadata/2015-12-19"
)
func main() {
m := metadata.NewClient(metadataUrl)
version := "init"
for {
newVersion, err := m.GetVersion()
if err != nil {
logrus.Errorf("Error reading metadata version: %v", err)
} else if version == newVersion {
logrus.Debug("No changes in metadata version")
} else {
logrus.Debugf("Metadata version has changed, oldVersion=[%s], newVersion=[%s]", version, newVersion)
version = newVersion
}
time.Sleep(5 * time.Second)
}
}

View file

@ -1,10 +0,0 @@
package main
import (
"fmt"
_ "github.com/rancher/go-rancher/client"
)
func main() {
fmt.Println("I have nothing to do...")
}