Skip to content

Commit

Permalink
✨ biliup-go 可作为第三方包被其他go程序直接调用
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoMiku01 committed Oct 1, 2022
1 parent cda9692 commit 283f4fd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
export BINARY_NAME="$BINARY_PREFIX$GOOS_$GOARCH$BINARY_SUFFIX"
export CGO_ENABLED=0
export LD_FLAGS="-w -s"
go build -o "output/$BINARY_NAME" -trimpath -ldflags "$LD_FLAGS" .
go build -o "output/$BINARY_NAME" -trimpath -ldflags "$LD_FLAGS" ./cmd/main.go
- name: Upload artifact
uses: actions/upload-artifact@v2
if: ${{ !github.head_ref }}
Expand Down
6 changes: 6 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ release:
discussion_category_name: General
builds:
- id: nowin

main: ./cmd/main.go

env:
- CGO_ENABLED=0
- GO111MODULE=on
Expand All @@ -32,6 +35,9 @@ builds:
ldflags:
- -s -w
- id: win

main: ./cmd/main.go

env:
- CGO_ENABLED=0
- GO111MODULE=on
Expand Down
4 changes: 2 additions & 2 deletions main.go → cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"biliup-go/login"
"biliup-go/upload"
"github.com/XiaoMiku01/biliup-go/login"
"github.com/XiaoMiku01/biliup-go/upload"
"gopkg.in/alecthomas/kingpin.v2"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module biliup-go
module github.com/XiaoMiku01/biliup-go

go 1.19

Expand Down
1 change: 0 additions & 1 deletion upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ func (u *Up) upload() {
wg.Wait()
close(partchan)
jsonString, _ := json.Marshal(&reqjson)
log.Println(string(jsonString))
u.client.R().SetHeaders(map[string]string{
"Content-Type": "application/json",
"Origin": "https://member.bilibili.com",
Expand Down

0 comments on commit 283f4fd

Please sign in to comment.