Skip to content

Commit

Permalink
style: modify output
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikubill committed Apr 9, 2020
1 parent c477841 commit 49fabc8
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ jobs:
- name: build
run: |
GOOS=windows GOARCH=amd64 go build -ldflags '-s -w -extldflags "-static"' -o bin/ci-test-windows-amd64.exe
GOOS=darwin GOARCH=amd64 go build -ldflags '-s -w -extldflags "-static"' -o bin/ci-test-macos-amd64
GOOS=linux GOARCH=amd64 go build -ldflags '-s -w -extldflags "-static"' -o bin/ci-test-linux-amd64
chmod +x bin/ci-test-linux-amd64
bin/ci-test-linux-amd64 --silent bin/ci-test-linux-amd64
bin/ci-test-linux-amd64 --silent bin/ci-test-macos-amd64
bin/ci-test-linux-amd64 --silent bin/ci-test-windows-amd64.exe
6 changes: 5 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ builds:
- arm
- 386
- amd64
- arm64
- arm64

release:
prerelease: auto
draft: true
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Backend Support:
wet - WeTransfer - https://wetransfer.com/
flk - FileLink - https://filelink.io/
trs - Transfer.sh - https://transfer.sh/
lzs - Lanzous - https://www.lanzous.com/
Usage:
transfer [command]
Expand Down Expand Up @@ -126,19 +127,6 @@ Usage:
Aliases:
upload, up
Available APIs:
arp - Airportal - https://aitportal.cn/
bit - bitSend - https://bitsend.jp/
cat - CatBox - https://catbox.moe/
cow - CowTransfer - https://www.cowtransfer.com/
gof - GoFile - https://gofile.io/
tmp - TmpLink - https://tmp.link/
vim - Vim-cn - https://img.vim-cn.com/
wss - WenShuShu - https://www.wenshushu.cn/
wet - WeTransfer - https://wetransfer.com/
flk - FileLink - https://filelink.io/
trs - Transfer.sh - https://transfer.sh/
Flags:
--encrypt Encrypt stream when upload
--encrypt-key string Specify the encrypt key
Expand Down
2 changes: 1 addition & 1 deletion apis/public/cowtransfer/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (b *cowTransfer) initUpload(totalSize int64) error {
if err != nil {
fmt.Printf("getSendConfig(single mode) returns error: %v\n", err)
}
fmt.Printf("Destination: %s\n", config.UniqueURL)
fmt.Printf("Download Link: %s\n", config.UniqueURL)
b.sendConf = *config
return nil
}
Expand Down
4 changes: 2 additions & 2 deletions apis/public/vimcn/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ func (b *vimcn) UploadStream(file []byte) {
}

b.resp = string(body)
fmt.Printf("%s\n", b.resp)
//fmt.Printf("%s\n", b.resp)
}

func (b *vimcn) PostUpload(string, int64) error {
fmt.Printf("%s\n", b.resp)
fmt.Printf("Download Link: %s\n", b.resp)
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions apis/public/wenshushu/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ func (b wssTransfer) completeUpload(config sendConfigBlock) error {
return fmt.Errorf("status != success")
}

fmt.Printf("Manage URL: %s\n", body.Data.ManageURL)
fmt.Printf("Public URL: %s\n", body.Data.PublicURL)
fmt.Printf("Manage Link: %s\n", body.Data.ManageURL)
fmt.Printf("Download Link: %s\n", body.Data.PublicURL)

return nil
}
Expand Down
2 changes: 1 addition & 1 deletion apis/public/wetransfer/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ func (b weTransfer) completeUpload(config *configBlock) error {
return err
}

fmt.Printf("Public URL: %s\n", body.Public)
fmt.Printf("Download Link: %s\n", body.Public)
return nil
}

Expand Down
1 change: 1 addition & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Backend Support:
wet - WeTransfer - https://wetransfer.com/
flk - FileLink - https://filelink.io/
trs - Transfer.sh - https://transfer.sh/
lzs - Lanzous - https://www.lanzous.com/
`,
SilenceErrors: true,
Example: ` # upload via wenshushu
Expand Down

0 comments on commit 49fabc8

Please sign in to comment.