Skip to content

Commit

Permalink
update go mod and test
Browse files Browse the repository at this point in the history
  • Loading branch information
konoui committed Jun 27, 2020
1 parent ff01815 commit d2c8ee5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
3 changes: 2 additions & 1 deletion cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ const (

func renderToWorkflow(t *tldr.Tldr, cmds []string, enableFuzzy bool) {
awf := alfred.NewWorkflow()
awf.SetStreams(outStream, outStream)
awf.SetOut(outStream)
awf.SetErr(errStream)
awf.EmptyWarning("No matching query", "Try a different query")

p, _ := t.FindPage(cmds)
Expand Down
8 changes: 4 additions & 4 deletions cmd/test_output_git-checkout.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@
}
},
{
"title": "git checkout {{file_name}}",
"title": "git checkout {{filename}}",
"subtitle": "Discard unstaged changes to a given file:",
"arg": "git checkout {{file_name}}",
"arg": "git checkout {{filename}}",
"mods": {
"ctrl": {
"variables": {
Expand All @@ -99,9 +99,9 @@
}
},
{
"title": "git checkout {{branch_name}} -- {{file_name}}",
"title": "git checkout {{branch_name}} -- {{filename}}",
"subtitle": "Replace a file in the current directory with the version of it committed in a given branch:",
"arg": "git checkout {{branch_name}} -- {{file_name}}",
"arg": "git checkout {{branch_name}} -- {{filename}}",
"mods": {
"ctrl": {
"variables": {
Expand Down
4 changes: 2 additions & 2 deletions cmd/test_output_git-checkout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ More information: <https://git-scm.com/docs/git-checkout>.
git checkout .

- Discard unstaged changes to a given file:
git checkout file_name
git checkout filename

- Replace a file in the current directory with the version of it committed in a given branch:
git checkout branch_name -- file_name
git checkout branch_name -- filename

6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/konoui/tldr

go 1.13
go 1.14

require (
github.com/google/go-cmp v0.4.0
github.com/konoui/go-alfred v0.0.0-20200405105304-3f78da241506
github.com/konoui/go-alfred v0.0.0-20200523111648-581f0d076bbe
github.com/mattn/go-shellwords v1.0.10
github.com/mitchellh/go-homedir v1.1.0
github.com/pkg/errors v0.9.1
github.com/sahilm/fuzzy v0.1.0
github.com/spf13/cobra v0.0.7
github.com/spf13/cobra v1.0.0
)
9 changes: 5 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@ github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/konoui/go-alfred v0.0.0-20200405105304-3f78da241506 h1:mMlag6Z03qAf9ERcCa9EYqq4NxOoy9vnVdQecNaNaZw=
github.com/konoui/go-alfred v0.0.0-20200405105304-3f78da241506/go.mod h1:Ja4KMaOBHyRsgBTM/Rq4lW79CO85EAhqKDQjdz7lD9s=
github.com/konoui/go-alfred v0.0.0-20200523111648-581f0d076bbe h1:AAvljr3I0sksZe7l5NLDCArOduhkHKzrjJgvSGcaRCM=
github.com/konoui/go-alfred v0.0.0-20200523111648-581f0d076bbe/go.mod h1:dKbY6+aF3WpS6LakR7M6iEtnkZ2i77FtAo3MAdNY7uo=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mattn/go-shellwords v1.0.10 h1:Y7Xqm8piKOO3v10Thp7Z36h4FYFjt5xB//6XvOrs2Gw=
github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y=
Expand Down Expand Up @@ -84,8 +85,8 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v0.0.7 h1:FfTH+vuMXOas8jmfb5/M7dzEYx7LpcLb7a0LPe34uOU=
github.com/spf13/cobra v0.0.7/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8=
github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
Expand Down

0 comments on commit d2c8ee5

Please sign in to comment.