mirror of
https://github.com/celogeek/piwigo-cli.git
synced 2025-05-24 09:42:36 +02:00
fix typo
This commit is contained in:
parent
a96b94f9d0
commit
04c3f1430c
@ -230,7 +230,7 @@ It displays in well on iTerm:
|
||||
|
||||
You can use "SPACE" for selection of a tag, "LEFT" to remove the current selection, type words to lookup.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## License
|
||||
|
@ -60,9 +60,9 @@ func (p *Piwigo) Upload(file *piwigotools.FileToUpload, stat *piwigotools.FileTo
|
||||
return
|
||||
}
|
||||
wg := &sync.WaitGroup{}
|
||||
chunks, err := file.Base64Chunker()
|
||||
chunks, err := file.Base64BuildChunk()
|
||||
if err != nil {
|
||||
stat.Error("Base64Chunker", *file.FullPath(), err)
|
||||
stat.Error("Base64BuildChunk", *file.FullPath(), err)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -154,14 +154,14 @@ type FileToUploadChunk struct {
|
||||
Buffer bytes.Buffer
|
||||
}
|
||||
|
||||
func (f *FileToUpload) Base64Chunker() (chan *FileToUploadChunk, error) {
|
||||
func (f *FileToUpload) Base64BuildChunk() (chan *FileToUploadChunk, error) {
|
||||
fh, err := os.Open(*f.FullPath())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
out := make(chan *FileToUploadChunk, 8)
|
||||
chunker := func() {
|
||||
go func() {
|
||||
b := make([]byte, CHUNK_BUFF_SIZE)
|
||||
defer fh.Close()
|
||||
defer close(out)
|
||||
@ -185,9 +185,7 @@ func (f *FileToUpload) Base64Chunker() (chan *FileToUploadChunk, error) {
|
||||
out <- bf
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
go chunker()
|
||||
}()
|
||||
|
||||
return out, nil
|
||||
}
|
||||
|
@ -63,9 +63,9 @@ func (s *FileToUploadStat) Add() {
|
||||
s.mu.Unlock()
|
||||
}
|
||||
|
||||
func (s *FileToUploadStat) Commit(filereaded int64) {
|
||||
func (s *FileToUploadStat) Commit(fileread int64) {
|
||||
s.mu.Lock()
|
||||
s.UploadedBytes += filereaded
|
||||
s.UploadedBytes += fileread
|
||||
s.Progress.Set64(s.UploadedBytes)
|
||||
s.mu.Unlock()
|
||||
}
|
||||
|
@ -89,16 +89,16 @@ func (t *node) AddPath(path string) Tree {
|
||||
Return a sorted list of children
|
||||
*/
|
||||
func (t *node) Children() []*node {
|
||||
childs := make([]*node, len(t.Nodes))
|
||||
children := make([]*node, len(t.Nodes))
|
||||
i := 0
|
||||
for _, n := range t.Nodes {
|
||||
childs[i] = n
|
||||
children[i] = n
|
||||
i++
|
||||
}
|
||||
sort.Slice(childs, func(i, j int) bool {
|
||||
return childs[i].Name < childs[j].Name
|
||||
sort.Slice(children, func(i, j int) bool {
|
||||
return children[i].Name < children[j].Name
|
||||
})
|
||||
return childs
|
||||
return children
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user