-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(dsfs): harmonize errors & ensure use of %w in fmt.Errorf
declare dsfs.ErrNoChanges & make sure it's properly wrapped up the call stack. We'll use this in lib for proper no-change detection
- Loading branch information
Showing
9 changed files
with
35 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Package dsfs glues datsets to cafs (content-addressed-file-system) | ||
package dsfs | ||
|
||
import ( | ||
"fmt" | ||
|
||
logger "github.com/ipfs/go-log" | ||
) | ||
|
||
var ( | ||
log = logger.Logger("dsfs") | ||
// ErrNoChanges indicates a save failed because no values changed, and | ||
// force-saving was disabled | ||
ErrNoChanges = fmt.Errorf("no changes") | ||
// ErrNoReadme is the error for asking a dataset without a readme component | ||
// for readme info | ||
ErrNoReadme = fmt.Errorf("this dataset has no readme component") | ||
// ErrNoTransform is the error for asking a dataset without a tranform | ||
// component for transform info | ||
ErrNoTransform = fmt.Errorf("this dataset has no transform component") | ||
// ErrNoViz is the error for asking a dataset without a viz component for | ||
// viz info | ||
ErrNoViz = fmt.Errorf("this dataset has no viz component") | ||
// ErrStrictMode indicates a dataset failed validation when it is required to | ||
// pass (Structure.Strict == true) | ||
ErrStrictMode = fmt.Errorf("dataset body did not validate against schema in strict-mode") | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters