import "github.com/docker/notary/server/storage" metaStore := storage.MetaStore{} currentSigningInfo, err := metaStore.GetCurrent("myTarget", "myRole") if err != nil { // handle error } // use currentSigningInfo in some way
import ( "fmt" "github.com/docker/notary/server/storage" ) func main() { metaStore := storage.MetaStore{} currentSigningInfo, err := metaStore.GetCurrent("myTarget2", "myRole2") if err != nil { fmt.Printf("Error getting current signing information: %v", err) return } fmt.Printf("Current signing information for target 'myTarget2' and role 'myRole2': %v", currentSigningInfo) }This example is similar to the first one, except it also imports the "fmt" package and includes some printing statements to display the current signing information if it is retrieved successfully. It's worth noting that the MetaStore function GetCurrent is part of the GitHub.com/docker/notary/server/storage package library.