layer/migration.go
Method layerStore.RegisterByGraphID
has 67 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (ls *layerStore) RegisterByGraphID(graphID string, parent ChainID, diffID DiffID, tarDataFile string, size int64) (Layer, error) {
// err is used to hold the error which will always trigger
// cleanup of creates sources but may not be an error returned
// to the caller (already exists).
var err error
Method layerStore.RegisterByGraphID
has 9 return statements (exceeds 4 allowed). Open
Open
func (ls *layerStore) RegisterByGraphID(graphID string, parent ChainID, diffID DiffID, tarDataFile string, size int64) (Layer, error) {
// err is used to hold the error which will always trigger
// cleanup of creates sources but may not be an error returned
// to the caller (already exists).
var err error
Method layerStore.RegisterByGraphID
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (ls *layerStore) RegisterByGraphID(graphID string, parent ChainID, diffID DiffID, tarDataFile string, size int64) (Layer, error) {
Method layerStore.ChecksumForGraphID
has 5 return statements (exceeds 4 allowed). Open
Open
func (ls *layerStore) ChecksumForGraphID(id, parent, newTarDataPath string) (diffID DiffID, size int64, err error) {
rawarchive, err := ls.driver.Diff(id, parent)
if err != nil {
return
}