27 lines
352 B
Go
27 lines
352 B
Go
|
package compliance
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
func Main() {
|
||
|
if len(os.Args) < 2 {
|
||
|
fmt.Println("usage: dumpdiff <outputdir>")
|
||
|
os.Exit(1)
|
||
|
}
|
||
|
|
||
|
outputDir := os.Args[1]
|
||
|
|
||
|
_, err := os.Stat(outputDir)
|
||
|
if os.IsNotExist(err) {
|
||
|
err = os.MkdirAll(outputDir, 0755)
|
||
|
}
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
|
||
|
loadChain()
|
||
|
WriteDiffs(outputDir, chain, blocks)
|
||
|
}
|