Skip to content

Commit

Permalink
add help option, add vendor directory
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyYe committed Aug 8, 2018
1 parent ff23fc1 commit 14b61b1
Show file tree
Hide file tree
Showing 386 changed files with 187,242 additions and 0 deletions.
133 changes: 133 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true


[[constraint]]
name = "github.com/PuerkitoBio/goquery"
version = "1.4.1"

[[constraint]]
name = "github.com/briandowns/spinner"
version = "1.1.0"

[[constraint]]
name = "github.com/fatih/color"
version = "1.7.0"

[[constraint]]
name = "github.com/joho/godotenv"
version = "1.2.0"

[[constraint]]
name = "github.com/smartystreets/goconvey"
version = "1.6.3"

[[constraint]]
branch = "master"
name = "golang.org/x/net"

[prune]
go-tests = true
unused-packages = true
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ func main() {
os.Exit(0)
}

if len(os.Args) == 2 && os.Args[1] == "-h" {
displayUsage()
os.Exit(0)
}

words, withVoice, withMore := parseArgs(os.Args)
query(words, withVoice, withMore, len(words) > 1)
}
1 change: 1 addition & 0 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ func displayUsage() {
color.Cyan("ydict <word(s) to query> Query the word(s)")
color.Cyan("ydict <word(s) to query> -v Query with speech")
color.Cyan("ydict <word(s) to query> -m Query with more example sentences")
color.Cyan("ydict -h For help")
}

func isChinese(str string) bool {
Expand Down
1 change: 1 addition & 0 deletions vendor/github.com/PuerkitoBio/goquery/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions vendor/github.com/PuerkitoBio/goquery/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions vendor/github.com/PuerkitoBio/goquery/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions vendor/github.com/PuerkitoBio/goquery/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 14b61b1

Please sign in to comment.