mirror of
https://github.com/celogeek/piwigo-cli.git
synced 2025-05-25 02:02:37 +02:00
remove camel case
This commit is contained in:
parent
b60ae43bf3
commit
d1dc0e72f6
@ -143,9 +143,9 @@ func (f *FileToUpload) Checked() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
CHUNK_SIZE int64 = 1 * 1024 * 1024
|
ChunkSize int64 = 1 * 1024 * 1024
|
||||||
CHUNK_BUFF_SIZE int64 = 32 * 1024
|
ChunkBuffSize int64 = 32 * 1024
|
||||||
CHUNK_BUFF_COUNT = CHUNK_SIZE / CHUNK_BUFF_SIZE
|
ChunkBuffCount = ChunkSize / ChunkBuffSize
|
||||||
)
|
)
|
||||||
|
|
||||||
type FileToUploadChunk struct {
|
type FileToUploadChunk struct {
|
||||||
@ -162,7 +162,7 @@ func (f *FileToUpload) Base64BuildChunk() (chan *FileToUploadChunk, error) {
|
|||||||
|
|
||||||
out := make(chan *FileToUploadChunk, 8)
|
out := make(chan *FileToUploadChunk, 8)
|
||||||
go func() {
|
go func() {
|
||||||
b := make([]byte, CHUNK_BUFF_SIZE)
|
b := make([]byte, ChunkBuffSize)
|
||||||
defer fh.Close()
|
defer fh.Close()
|
||||||
defer close(out)
|
defer close(out)
|
||||||
ok := false
|
ok := false
|
||||||
@ -171,7 +171,7 @@ func (f *FileToUpload) Base64BuildChunk() (chan *FileToUploadChunk, error) {
|
|||||||
Position: position,
|
Position: position,
|
||||||
}
|
}
|
||||||
b64 := base64.NewEncoder(base64.StdEncoding, &bf.Buffer)
|
b64 := base64.NewEncoder(base64.StdEncoding, &bf.Buffer)
|
||||||
for i := int64(0); i < CHUNK_BUFF_COUNT; i++ {
|
for i := int64(0); i < ChunkBuffCount; i++ {
|
||||||
n, _ := fh.Read(b)
|
n, _ := fh.Read(b)
|
||||||
if n == 0 {
|
if n == 0 {
|
||||||
ok = true
|
ok = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user