예제 #1
0
func main() {
	var clusterFile string

	prefix := []byte(os.Args[1])
	if len(os.Args) > 3 {
		clusterFile = os.Args[3]
	}

	var e error
	var apiVersion int

	apiVersion, e = strconv.Atoi(os.Args[2])
	if e != nil {
		log.Fatal(e)
	}

	e = fdb.APIVersion(apiVersion)
	if e != nil {
		log.Fatal(e)
	}

	db, e = fdb.Open(clusterFile, []byte("DB"))
	if e != nil {
		log.Fatal(e)
	}

	sm := newStackMachine(prefix, verbose, newDirectoryExtension())

	sm.Run()
}
예제 #2
0
func main() {
	prefix := []byte(os.Args[1])
	if len(os.Args) > 2 {
		clusterFile = os.Args[2]
	}

	var e error

	e = fdb.APIVersion(101)
	if e != nil {
		log.Fatal(e)
	}

	db, e = fdb.Open(clusterFile, []byte("DB"))
	if e != nil {
		log.Fatal(e)
	}

	sm := newStackMachine(prefix, verbose)

	sm.Run()
}