Switch to using the dep tool and update all the dependencies
This commit is contained in:
parent
5135ff73cb
commit
98c2d2c41b
5321 changed files with 4483201 additions and 5922 deletions
25
vendor/github.com/skratchdot/open-golang/.gitignore
generated
vendored
Normal file
25
vendor/github.com/skratchdot/open-golang/.gitignore
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Eclipse files
|
||||
.project
|
||||
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
5
vendor/github.com/skratchdot/open-golang/Makefile
generated
vendored
Normal file
5
vendor/github.com/skratchdot/open-golang/Makefile
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
all:
|
||||
@echo "Try 'make readme'"
|
||||
|
||||
readme:
|
||||
godoc -templates=./readme-template/ "github.com/skratchdot/open-golang/open" > ./README.md
|
71
vendor/github.com/skratchdot/open-golang/README.md
generated
vendored
Normal file
71
vendor/github.com/skratchdot/open-golang/README.md
generated
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
# open
|
||||
|
||||
## Description ##
|
||||
|
||||
Open a file, directory, or URI using the OS's default application for
|
||||
that object type. Optionally, you can specify an application to use.
|
||||
|
||||
This is a proxy for the following commands:
|
||||
|
||||
OSX: "open"
|
||||
Windows: "start"
|
||||
Linux/Other: "xdg-open"
|
||||
|
||||
This is a golang port of the node.js module:
|
||||
https://github.com/pwnall/node-open
|
||||
|
||||
|
||||
## Documentation ##
|
||||
|
||||
[http://godoc.org/github.com/skratchdot/open-golang/open](http://godoc.org/github.com/skratchdot/open-golang/open)
|
||||
|
||||
## Import ##
|
||||
|
||||
import "github.com/skratchdot/open-golang/open"
|
||||
|
||||
## Usage ##
|
||||
|
||||
### open google.com in the user's default browser (method 1):
|
||||
|
||||
open.Run("https://google.com/")
|
||||
|
||||
### open google.com in the user's default browser (method 2):
|
||||
|
||||
open.Start("https://google.com")
|
||||
|
||||
### you can listen for errors
|
||||
|
||||
err := open.Run("https://google.com/")
|
||||
|
||||
### you can specify the program to use
|
||||
|
||||
open.RunWith("https://google.com/", "firefox")
|
||||
|
||||
|
||||
## Functions ##
|
||||
|
||||
### func Run(input string) error
|
||||
|
||||
Open a file, directory, or URI using the OS's default application for
|
||||
that object type. Wait for the open command to complete.
|
||||
|
||||
### func RunWith(input string, appName string) error
|
||||
|
||||
Open a file, directory, or URI using the specified application. Wait for
|
||||
the open command to complete.
|
||||
|
||||
### func Start(input string) error
|
||||
|
||||
Open a file, directory, or URI using the OS's default application for
|
||||
that object type. Don't wait for the open command to complete.
|
||||
|
||||
### func StartWith(input string, appName string) error
|
||||
|
||||
Open a file, directory, or URI using the specified application. Don't
|
||||
wait for the open command to complete.
|
||||
|
||||
|
||||
## License ##
|
||||
|
||||
Copyright (c) 2013 skratchdot
|
||||
Licensed under the MIT license.
|
70
vendor/github.com/skratchdot/open-golang/open/open_test.go
generated
vendored
Normal file
70
vendor/github.com/skratchdot/open-golang/open/open_test.go
generated
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
package open
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestRun(t *testing.T) {
|
||||
// shouldn't error
|
||||
input := "https://google.com/"
|
||||
err := Run(input)
|
||||
if err != nil {
|
||||
t.Errorf("open.Run(\"%s\") threw an error: %s", input, err)
|
||||
}
|
||||
|
||||
// should error
|
||||
input = "xxxxxxxxxxxxxxx"
|
||||
err = Run(input)
|
||||
if err == nil {
|
||||
t.Errorf("Run(\"%s\") did not throw an error as expected", input)
|
||||
}
|
||||
}
|
||||
|
||||
func TestStart(t *testing.T) {
|
||||
// shouldn't error
|
||||
input := "https://google.com/"
|
||||
err := Start(input)
|
||||
if err != nil {
|
||||
t.Errorf("open.Start(\"%s\") threw an error: %s", input, err)
|
||||
}
|
||||
|
||||
// shouldn't error
|
||||
input = "xxxxxxxxxxxxxxx"
|
||||
err = Start(input)
|
||||
if err != nil {
|
||||
t.Errorf("open.Start(\"%s\") shouldn't even fail on invalid input: %s", input, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRunWith(t *testing.T) {
|
||||
// shouldn't error
|
||||
input := "https://google.com/"
|
||||
app := "firefox"
|
||||
err := RunWith(input, app)
|
||||
if err != nil {
|
||||
t.Errorf("open.RunWith(\"%s\", \"%s\") threw an error: %s", input, app, err)
|
||||
}
|
||||
|
||||
// should error
|
||||
app = "xxxxxxxxxxxxxxx"
|
||||
err = RunWith(input, app)
|
||||
if err == nil {
|
||||
t.Errorf("RunWith(\"%s\", \"%s\") did not throw an error as expected", input, app)
|
||||
}
|
||||
}
|
||||
|
||||
func TestStartWith(t *testing.T) {
|
||||
// shouldn't error
|
||||
input := "https://google.com/"
|
||||
app := "firefox"
|
||||
err := StartWith(input, app)
|
||||
if err != nil {
|
||||
t.Errorf("open.StartWith(\"%s\", \"%s\") threw an error: %s", input, app, err)
|
||||
}
|
||||
|
||||
// shouldn't error
|
||||
input = "[<Invalid URL>]"
|
||||
err = StartWith(input, app)
|
||||
if err != nil {
|
||||
t.Errorf("StartWith(\"%s\", \"%s\") shouldn't even fail on invalid input: %s", input, app, err)
|
||||
}
|
||||
|
||||
}
|
111
vendor/github.com/skratchdot/open-golang/readme-template/package.txt
generated
vendored
Normal file
111
vendor/github.com/skratchdot/open-golang/readme-template/package.txt
generated
vendored
Normal file
|
@ -0,0 +1,111 @@
|
|||
{{with .PAst}}{{node $ .}}{{end}}{{/*
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*/}}{{with .PDoc}}{{if $.IsMain}}COMMAND DOCUMENTATION
|
||||
|
||||
{{comment_text .Doc " " "\t"}}
|
||||
{{else}}# {{.Name}}
|
||||
|
||||
## Description ##
|
||||
|
||||
{{comment_text .Doc " " "\t"}}
|
||||
|
||||
## Documentation ##
|
||||
|
||||
[http://godoc.org/{{.ImportPath}}](http://godoc.org/{{.ImportPath}})
|
||||
|
||||
## Import ##
|
||||
|
||||
import "{{.ImportPath}}"
|
||||
|
||||
## Usage ##
|
||||
|
||||
### open google.com in the user's default browser (method 1):
|
||||
|
||||
open.Run("https://google.com/")
|
||||
|
||||
### open google.com in the user's default browser (method 2):
|
||||
|
||||
open.Start("https://google.com")
|
||||
|
||||
### you can listen for errors
|
||||
|
||||
err := open.Run("https://google.com/")
|
||||
|
||||
### you can specify the program to use
|
||||
|
||||
open.RunWith("https://google.com/", "firefox")
|
||||
|
||||
{{example_text $ "" " "}}{{/*
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*/}}{{with .Consts}}
|
||||
CONSTANTS
|
||||
|
||||
{{range .}}{{node $ .Decl}}
|
||||
{{comment_text .Doc " " "\t"}}
|
||||
{{end}}{{end}}{{/*
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*/}}{{with .Vars}}
|
||||
VARIABLES
|
||||
|
||||
{{range .}}{{node $ .Decl}}
|
||||
{{comment_text .Doc " " "\t"}}
|
||||
{{end}}{{end}}{{/*
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*/}}{{with .Funcs}}
|
||||
## Functions ##
|
||||
|
||||
{{range .}}### {{node $ .Decl}}
|
||||
|
||||
{{comment_text .Doc " " "\t"}}
|
||||
{{example_text $ .Name " "}}{{end}}{{end}}{{/*
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*/}}{{with .Types}}
|
||||
TYPES
|
||||
|
||||
{{range .}}{{$tname := .Name}}{{node $ .Decl}}
|
||||
{{comment_text .Doc " " "\t"}}
|
||||
{{range .Consts}}{{node $ .Decl}}
|
||||
{{comment_text .Doc " " "\t"}}
|
||||
{{end}}{{range .Vars}}{{node $ .Decl}}
|
||||
{{comment_text .Doc " " "\t"}}
|
||||
{{end}}{{example_text $ .Name " "}}
|
||||
{{range .Funcs}}{{node $ .Decl}}
|
||||
{{comment_text .Doc " " "\t"}}
|
||||
{{example_text $ .Name " "}}
|
||||
{{end}}{{range .Methods}}{{node $ .Decl}}
|
||||
{{comment_text .Doc " " "\t"}}
|
||||
{{$name := printf "%s_%s" $tname .Name}}{{example_text $ $name " "}}{{end}}
|
||||
{{end}}{{end}}{{end}}{{/*
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*/}}{{with $.Notes}}
|
||||
{{range $marker, $content := .}}
|
||||
{{$marker}}S
|
||||
|
||||
{{range $content}}{{comment_text .Body " " "\t"}}
|
||||
{{end}}{{end}}{{end}}{{end}}{{/*
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*/}}{{with .Dirs}}
|
||||
SUBDIRECTORIES
|
||||
{{if $.DirFlat}}{{range .List}}{{if .HasPkg}}
|
||||
{{.Path}}{{end}}{{end}}
|
||||
{{else}}{{range .List}}
|
||||
{{repeat `. ` .Depth}}{{.Name}}{{end}}
|
||||
{{end}}{{end}}
|
||||
## License ##
|
||||
|
||||
Copyright (c) 2013 skratchdot
|
||||
Licensed under the MIT license.
|
Loading…
Add table
Add a link
Reference in a new issue