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
acbd9a22
Commit
acbd9a22
authored
Jan 13, 2015
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rm unused function
parent
9a7fbe32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
17 deletions
+0
-17
repo/fsrepo/serialize.go
repo/fsrepo/serialize.go
+0
-17
No files found.
repo/fsrepo/serialize.go
View file @
acbd9a22
...
...
@@ -43,23 +43,6 @@ func writeConfigFile(filename string, cfg interface{}) error {
return
encode
(
f
,
cfg
)
}
// writeFile writes the buffer at filename
func
writeFile
(
filename
string
,
buf
[]
byte
)
error
{
err
:=
os
.
MkdirAll
(
filepath
.
Dir
(
filename
),
0775
)
if
err
!=
nil
{
return
err
}
f
,
err
:=
os
.
Create
(
filename
)
if
err
!=
nil
{
return
err
}
defer
f
.
Close
()
_
,
err
=
f
.
Write
(
buf
)
return
err
}
// encode configuration with JSON
func
encode
(
w
io
.
Writer
,
value
interface
{})
error
{
// need to prettyprint, hence MarshalIndent, instead of Encoder
...
...
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