ctx, err := dvid.NewContext("localhost:8000") if err != nil { log.Fatalf("Error creating DVID context: %v", err) } defer ctx.Close() // Create a version version, err := ctx.NewVersion("v1") if err != nil { log.Fatalf("Error creating new version v1: %v", err) }
ctx, err := dvid.NewContext("localhost:8000") if err != nil { log.Fatalf("Error creating DVID context: %v", err) } defer ctx.Close() // Get a version and retrieve data version, err := ctx.GetVersion("v1") if err != nil { log.Fatalf("Error getting version v1: %v", err) } data, err := version.Get("my_data") if err != nil { log.Fatalf("Error getting data: %v", err) } fmt.Println(data)In this example, a new DVID context is created and a version is obtained using the `GetVersion` method. Data is then retrieved using the `Get` method. This package library is used mainly for distributed versioned database storage in the Janelia Research Campus at the Howard Hughes Medical Institute.