Skip to content

Commit a11cc4f

Browse files
author
Matthew Fisher
committed
style(builder): compress into one-liners
1 parent 0733f3a commit a11cc4f

5 files changed

Lines changed: 5 additions & 10 deletions

File tree

builder/bin/extract-domain.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import (
99
)
1010

1111
func main() {
12-
fi, _ := os.Stdin.Stat()
13-
if fi.Mode()&os.ModeNamedPipe == 0 {
12+
if fi, _ := os.Stdin.Stat(); fi.Mode()&os.ModeNamedPipe == 0 {
1413
fmt.Println("this app only works using the stdout of another process")
1514
os.Exit(1)
1615
}

builder/bin/extract-types.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import (
99
)
1010

1111
func main() {
12-
fi, _ := os.Stdin.Stat()
13-
if fi.Mode()&os.ModeNamedPipe == 0 {
12+
if fi, _ := os.Stdin.Stat(); fi.Mode()&os.ModeNamedPipe == 0 {
1413
fmt.Println("this app only works using the stdout of another process")
1514
os.Exit(1)
1615
}

builder/bin/extract-version.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import (
99
)
1010

1111
func main() {
12-
fi, _ := os.Stdin.Stat()
13-
if fi.Mode()&os.ModeNamedPipe == 0 {
12+
if fi, _ := os.Stdin.Stat(); fi.Mode()&os.ModeNamedPipe == 0 {
1413
fmt.Println("this app only works using the stdout of another process")
1514
os.Exit(1)
1615
}

builder/bin/get-app-values.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import (
99
)
1010

1111
func main() {
12-
fi, _ := os.Stdin.Stat()
13-
if fi.Mode()&os.ModeNamedPipe == 0 {
12+
if fi, _ := os.Stdin.Stat(); fi.Mode()&os.ModeNamedPipe == 0 {
1413
fmt.Println("this app only works using the stdout of another process")
1514
os.Exit(1)
1615
}

builder/bin/yaml2json-procfile.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ import (
99
)
1010

1111
func main() {
12-
fi, _ := os.Stdin.Stat()
13-
if fi.Mode()&os.ModeNamedPipe == 0 {
12+
if fi, _ := os.Stdin.Stat(); fi.Mode()&os.ModeNamedPipe == 0 {
1413
fmt.Println("this app only works using the stdout of another process")
1514
os.Exit(1)
1615
}

0 commit comments

Comments
 (0)