refactor: restructure project to standard Go layout
- Reorganize code into cmd/bilidown and internal/ packages - Rename client/ to web/ for frontend source - Remove systray dependency for headless web service - Embed static files into binary using go:embed - Update import paths to use internal/ prefix - Update .gitignore with common patterns Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package util_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"bilidown/common"
|
||||
"bilidown/util"
|
||||
)
|
||||
|
||||
func TestRandomString(t *testing.T) {
|
||||
for i := 4; i < 10; i++ {
|
||||
for j := 0; j < 3; j++ {
|
||||
str := common.RandomString(i)
|
||||
t.Log(str)
|
||||
}
|
||||
t.Log("\n")
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetRedirectedLocation(t *testing.T) {
|
||||
os.Setenv("https_proxy", "http://192.168.1.5:9000")
|
||||
if location, err := util.GetRedirectedLocation("https://b23.tv/Ga6sbzT"); err != nil {
|
||||
t.Error(err)
|
||||
} else {
|
||||
fmt.Println(location)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user