You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
star/mget/wget_test.go

36 lines
515 B
Go

5 days ago
package mget
import (
"b612.me/starnet"
"fmt"
"testing"
)
func TestWget(t *testing.T) {
r := starnet.NewSimpleRequest("http://192.168.2.33:88/DJI_0746.MP4", "GET")
w := Mget{
Setting: *r,
RedoRPO: 1048576,
BufferSize: 8192,
Thread: 8,
}
if err := w.Run(); err != nil {
t.Fatal(err)
}
}
func TestSM(t *testing.T) {
a := map[string]string{
"1": "1",
"2": "2",
}
modify(a)
fmt.Println(a)
}
func modify(a map[string]string) {
b := make(map[string]string)
b = a
b["1"] = "3"
}