Skip to content

Commit

Permalink
move progress into a separate package
Browse files Browse the repository at this point in the history
  • Loading branch information
mutantmonkey committed Oct 16, 2015
1 parent 5202775 commit 758a109
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion linx.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/adrg/xdg"
"golang.org/x/net/proxy"
"gopkg.in/yaml.v2"
"mutantmonkey.in/code/golinx/progress"
)

type Config struct {
Expand Down Expand Up @@ -92,7 +93,7 @@ func linx(config *Config, filepath string, ttl int, deleteKey string) {
if err != nil {
log.Fatalf("Failed to stat file: %v\n", err)
}
reader := NewProgressReader(filename, bufio.NewReader(f), stat.Size())
reader := progress.NewProgressReader(filename, bufio.NewReader(f), stat.Size())

req, err := http.NewRequest("PUT", uploadUrl, reader)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion progress.go → progress/progress.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package progress

import (
"bytes"
Expand Down

0 comments on commit 758a109

Please sign in to comment.