client/pkg/tuf/client.go
Method Client.setup
has 7 return statements (exceeds 4 allowed). Open
Open
func (c *Client) setup(rootVersion int64, rootSha512 string) error {
var rootBasename string
if rootVersion == 0 {
rootBasename = "root.json"
} else {
Method Client.initTufClient
has 6 return statements (exceeds 4 allowed). Open
Open
func (c *Client) initTufClient() error {
localDB, err := leveldbstore.FileLocalStore(c.metaLocalStoreDir)
if err != nil {
return fmt.Errorf("unable to init file local store: %w", err)
}
Method Client.saveMeta
has 5 return statements (exceeds 4 allowed). Open
Open
func (c *Client) saveMeta() error {
localDB, err := leveldbstore.FileLocalStore(c.metaLocalStoreDir)
if err != nil {
return fmt.Errorf("unable to init file local store: %w", err)
}
Function NewClient
has 5 return statements (exceeds 4 allowed). Open
Open
func NewClient(repoUrl, metaLocalStoreDir, locksPath string) (*Client, error) {
c := &Client{}
c.metaLocalStoreDir = metaLocalStoreDir
c.repoUrl = repoUrl