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-unixfs
Commits
887fbe4a
Commit
887fbe4a
authored
Jan 14, 2015
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(fsrepo) change func to method to be consistent
parent
9f67ede6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
repo/fsrepo/fsrepo.go
repo/fsrepo/fsrepo.go
+4
-4
No files found.
repo/fsrepo/fsrepo.go
View file @
887fbe4a
...
...
@@ -166,7 +166,7 @@ func (r *FSRepo) Open() error {
return
debugerror
.
Errorf
(
"logs: %s"
,
err
)
}
return
transitionToOpened
(
r
)
return
r
.
transitionToOpened
()
}
// Close closes the FSRepo, releasing held resources.
...
...
@@ -183,7 +183,7 @@ func (r *FSRepo) Close() error {
return
err
}
}
return
transitionToClosed
(
r
)
return
r
.
transitionToClosed
()
}
// Config returns the FSRepo's config. This method must not be called if the
...
...
@@ -281,7 +281,7 @@ func initCheckDir(path string) error {
// transitionToOpened manages the state transition to |opened|. Caller must hold
// the package mutex.
func
transitionToOpened
(
r
*
FSRepo
)
error
{
func
(
r
*
FSRepo
)
transitionToOpened
()
error
{
r
.
state
=
opened
if
countBefore
:=
openerCounter
.
NumOpeners
(
r
.
path
);
countBefore
==
0
{
// #first
closer
,
err
:=
lockfile
.
Lock
(
r
.
path
)
...
...
@@ -295,7 +295,7 @@ func transitionToOpened(r *FSRepo) error {
// transitionToClosed manages the state transition to |closed|. Caller must
// hold the package mutex.
func
transitionToClosed
(
r
*
FSRepo
)
error
{
func
(
r
*
FSRepo
)
transitionToClosed
()
error
{
r
.
state
=
closed
if
err
:=
openerCounter
.
RemoveOpener
(
r
.
path
);
err
!=
nil
{
return
err
...
...
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