mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
cmd/abigen: simplify code a bit
This commit is contained in:
parent
30e37cdca4
commit
6c1b4a503c
1 changed files with 4 additions and 8 deletions
|
|
@ -115,16 +115,12 @@ func main() {
|
||||||
var err error
|
var err error
|
||||||
if *abiFlag == "-" {
|
if *abiFlag == "-" {
|
||||||
abi, err = ioutil.ReadAll(os.Stdin)
|
abi, err = ioutil.ReadAll(os.Stdin)
|
||||||
if err != nil {
|
|
||||||
fmt.Printf("Failed to read input ABI from stdin: %v\n", err)
|
|
||||||
os.Exit(-1)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
abi, err = ioutil.ReadFile(*abiFlag)
|
abi, err = ioutil.ReadFile(*abiFlag)
|
||||||
if err != nil {
|
}
|
||||||
fmt.Printf("Failed to read input ABI: %v\n", err)
|
if err != nil {
|
||||||
os.Exit(-1)
|
fmt.Printf("Failed to read input ABI: %v\n", err)
|
||||||
}
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
abis = append(abis, string(abi))
|
abis = append(abis, string(abi))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue