mirror of
https://github.com/rancher/os.git
synced 2025-09-02 15:24:32 +00:00
Run gofmt and fix vet errors
This commit is contained in:
@@ -173,7 +173,7 @@ func writeRespawn() error {
|
|||||||
p := path.Join("/etc/respawn.conf.d", f.Name())
|
p := path.Join("/etc/respawn.conf.d", f.Name())
|
||||||
content, err := ioutil.ReadFile(p)
|
content, err := ioutil.ReadFile(p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Failed to read %s: %v", p, err)
|
log.Errorf("Failed to read %s: %v", p, err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
respawn += fmt.Sprintf("\n%s", string(content))
|
respawn += fmt.Sprintf("\n%s", string(content))
|
||||||
|
@@ -25,7 +25,7 @@ func Main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if newConsole != "default" {
|
if newConsole != "default" {
|
||||||
project.ServiceConfigs.Add("console", &composeConfig.ServiceConfig{})
|
project.ServiceConfigs.Add("console", &composeConfig.ServiceConfig{})
|
||||||
|
|
||||||
if err = compose.LoadService(project, cfg, true, newConsole); err != nil {
|
if err = compose.LoadService(project, cfg, true, newConsole); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
@@ -202,12 +202,12 @@ func TestSet(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type OuterData struct {
|
type OuterData struct {
|
||||||
One Data `"yaml:one"`
|
One Data `yaml:"one"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Data struct {
|
type Data struct {
|
||||||
Two bool `"yaml:two"`
|
Two bool `yaml:"two"`
|
||||||
Three bool `"yaml:three"`
|
Three bool `yaml:"three"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMapMerge(t *testing.T) {
|
func TestMapMerge(t *testing.T) {
|
||||||
|
@@ -8,10 +8,10 @@ func (s *QemuSuite) TestMounts(c *C) {
|
|||||||
|
|
||||||
s.CheckCall(c, "cat /home/rancher/test | grep test")
|
s.CheckCall(c, "cat /home/rancher/test | grep test")
|
||||||
|
|
||||||
s.CheckCall(c, "mkdir -p /home/rancher/a /home/rancher/b /home/rancher/c")
|
s.CheckCall(c, "mkdir -p /home/rancher/a /home/rancher/b /home/rancher/c")
|
||||||
s.CheckCall(c, "sudo mkfs.ext4 /dev/vdb")
|
s.CheckCall(c, "sudo mkfs.ext4 /dev/vdb")
|
||||||
s.CheckCall(c, "sudo cloud-init-execute")
|
s.CheckCall(c, "sudo cloud-init-execute")
|
||||||
s.CheckCall(c, "mount | grep /home/rancher/a")
|
s.CheckCall(c, "mount | grep /home/rancher/a")
|
||||||
s.CheckCall(c, "mount | grep /home/rancher/b")
|
s.CheckCall(c, "mount | grep /home/rancher/b")
|
||||||
s.CheckCall(c, "mount | grep /home/rancher/c")
|
s.CheckCall(c, "mount | grep /home/rancher/c")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user