增加使用系统默认浏览器打开连接方法
This commit is contained in:
9
init.go
9
init.go
@@ -40,6 +40,8 @@ var (
|
||||
UserAgent *userAgent
|
||||
// Console 控制台输出数据
|
||||
Console *console
|
||||
// Browser 浏览器操作实例
|
||||
Browser *browser
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -61,4 +63,11 @@ func init() {
|
||||
list: defaultUserAgentList,
|
||||
}
|
||||
Console = &console{}
|
||||
Browser = &browser{
|
||||
commandTable: map[string]string{
|
||||
"windows": "start",
|
||||
"darwin": "open",
|
||||
"linux": "xdg-open",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user