Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-ds-flatfs
Commits
12c0c1d2
Commit
12c0c1d2
authored
Mar 29, 2018
by
Kevin Atkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enhance combineAccuracy to handle unknown cases better.
parent
08c78dc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
flatfs.go
flatfs.go
+11
-1
No files found.
flatfs.go
View file @
12c0c1d2
...
...
@@ -58,12 +58,16 @@ const (
type initAccuracy string
const (
unknownA initAccuracy = "unknown"
exactA initAccuracy = "initial-exact"
approxA initAccuracy = "initial-approximate"
timedoutA initAccuracy = "initial-timed-out"
)
func combineAccuracy(a, b initAccuracy) initAccuracy {
if a == unknownA || b == unknownA {
return unknownA
}
if a == timedoutA || b == timedoutA {
return timedoutA
}
...
...
@@ -73,7 +77,13 @@ func combineAccuracy(a, b initAccuracy) initAccuracy {
if a == exactA && b == exactA {
return exactA
}
return
""
if a == "" {
return b
}
if b == "" {
return a
}
return unknownA
}
var _ datastore.Datastore = (*Datastore)(nil)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment