NewCURL only create a curl
This commit is contained in:
parent
3ab6177286
commit
7b326f3644
@ -1,7 +1,6 @@
|
||||
package curl2info
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
@ -28,20 +27,7 @@ type CURL struct {
|
||||
}
|
||||
|
||||
// NewCURL new 一个 curl 出来
|
||||
func NewCURL(scurl ...string) *CURL {
|
||||
|
||||
if len(scurl) != 0 {
|
||||
if len(scurl) > 1 {
|
||||
panic(errors.New("NewCURL only accept one curl info"))
|
||||
}
|
||||
|
||||
curl, err := ParseRawCURL(scurl[0])
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return curl
|
||||
|
||||
}
|
||||
func NewCURL() *CURL {
|
||||
|
||||
u := &CURL{}
|
||||
u.Insecure = false
|
||||
|
Loading…
x
Reference in New Issue
Block a user