Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-fuse
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
jacobsa-fuse
Commits
fa4c2fb8
Commit
fa4c2fb8
authored
Mar 03, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented two missing functions.
parent
6b81f4ce
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
samples/memfs/memfs_test.go
samples/memfs/memfs_test.go
+28
-2
No files found.
samples/memfs/memfs_test.go
View file @
fa4c2fb8
...
...
@@ -7,7 +7,9 @@ import (
"io/ioutil"
"log"
"os"
"os/user"
"path"
"strconv"
"strings"
"syscall"
"testing"
...
...
@@ -27,9 +29,33 @@ func TestMemFS(t *testing.T) { RunTests(t) }
// Helpers
////////////////////////////////////////////////////////////////////////
func
currentUid
()
uint32
func
currentUid
()
uint32
{
user
,
err
:=
user
.
Current
()
if
err
!=
nil
{
panic
(
err
)
}
uid
,
err
:=
strconv
.
ParseUint
(
user
.
Uid
,
10
,
32
)
if
err
!=
nil
{
panic
(
err
)
}
return
uint32
(
uid
)
}
func
currentGid
()
uint32
func
currentGid
()
uint32
{
user
,
err
:=
user
.
Current
()
if
err
!=
nil
{
panic
(
err
)
}
gid
,
err
:=
strconv
.
ParseUint
(
user
.
Gid
,
10
,
32
)
if
err
!=
nil
{
panic
(
err
)
}
return
uint32
(
gid
)
}
func
timespecToTime
(
ts
syscall
.
Timespec
)
time
.
Time
...
...
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