cli: add nomad fmt (#14779)

This commit is contained in:
Damian Czaja
2022-10-06 23:00:29 +02:00
committed by GitHub
parent 8a3c9755ef
commit e4efedbbe4
11 changed files with 561 additions and 0 deletions

17
command/testdata/fmt/job.in.hcl vendored Normal file
View File

@@ -0,0 +1,17 @@
job "job1" {
type = "service"
datacenters = [ "dc1" ]
group "group1" {
count = 1
task "task1" {
driver = "exec"
config {
command = "/bin/sleep"
}
resources {
cpu = 1000
memory = 512
}
}
}
}

17
command/testdata/fmt/job.out.hcl vendored Normal file
View File

@@ -0,0 +1,17 @@
job "job1" {
type = "service"
datacenters = ["dc1"]
group "group1" {
count = 1
task "task1" {
driver = "exec"
config {
command = "/bin/sleep"
}
resources {
cpu = 1000
memory = 512
}
}
}
}

8
command/testdata/fmt/nomad.in.hcl vendored Normal file
View File

@@ -0,0 +1,8 @@
server {
enabled = true
bootstrap_expect = 3
}
consul {
address = "1.2.3.4:8500"
}

8
command/testdata/fmt/nomad.out.hcl vendored Normal file
View File

@@ -0,0 +1,8 @@
server {
enabled = true
bootstrap_expect = 3
}
consul {
address = "1.2.3.4:8500"
}