Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
MKCLOS
Core Development Platform
coreospackage
Commits
0b00c5b2
Commit
0b00c5b2
authored
7 years ago
by
Sandeep S. Shewalkar
Browse files
Options
Downloads
Plain Diff
Merge branch 'stagingbranch' into 'master'
Stagingbranch See merge request
!17
parents
6adf24d5
b84b6a2d
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!17
Stagingbranch
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dalhelper/dalMySQL.go
+1
-1
dalhelper/dalMySQL.go
downloadhelper/fileutil.go
+8
-5
downloadhelper/fileutil.go
with
9 additions
and
6 deletions
dalhelper/dalMySQL.go
+
1
−
1
View file @
0b00c5b2
...
...
@@ -2,7 +2,7 @@ package dalhelper
import
(
"sync"
_
"github.com/go-sql-driver/mysql"
"corelab.mkcl.org/MKCLOS/coredevelopmentplatform/coreospackage/confighelper"
"github.com/gocraft/dbr"
...
...
This diff is collapsed.
Click to expand it.
downloadhelper/fileutil.go
+
8
−
5
View file @
0b00c5b2
...
...
@@ -61,13 +61,15 @@ func mergeFiles(filename string, count int) {
fmt
.
Println
(
"temp file name : "
+
tempFilename
)
fmt
.
Println
(
"file name : "
+
filename
)
file
,
err
:=
os
.
OpenFile
(
DownloadLocation
+
"/"
+
tempFilename
,
os
.
O_CREATE
|
os
.
O_WRONLY
|
os
.
O_APPEND
,
0666
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
}
defer
file
.
Close
()
for
i
:=
0
;
i
<
count
;
i
++
{
partFilename
:=
DownloadLocation
+
"/temp/"
+
filename
+
"_"
+
strconv
.
Itoa
(
i
)
file
,
err
:=
os
.
OpenFile
(
DownloadLocation
+
"/"
+
tempFilename
,
os
.
O_CREATE
|
os
.
O_WRONLY
|
os
.
O_APPEND
,
0666
)
if
err
!=
nil
{
log
.
Fatal
(
err
)
}
defer
file
.
Close
()
reader
,
err
:=
ioutil
.
ReadFile
(
partFilename
)
reader
=
reader
[
16
:
]
if
err
!=
nil
{
...
...
@@ -77,6 +79,7 @@ func mergeFiles(filename string, count int) {
log
.
Fatal
(
err
)
}
}
file
.
Close
()
os
.
Rename
(
DownloadLocation
+
"/"
+
tempFilename
,
DownloadLocation
+
"/"
+
filename
)
}
func
isDirEmpty
(
name
string
)
(
bool
,
error
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets