Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Commit

Permalink
Use go modules
Browse files Browse the repository at this point in the history
  • Loading branch information
deanishe committed Oct 20, 2018
1 parent 4f88d45 commit cb7f73d
Show file tree
Hide file tree
Showing 188 changed files with 270,329 additions and 11 deletions.
2 changes: 1 addition & 1 deletion actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func init() {

// doBlacklist adds the specified action names to the blacklist.
func doBlacklist() error {
wf.TextErrors = true
wf.Configure(aw.TextErrors(true))
return addToBlacklist(scriptNames...)
}

Expand Down
13 changes: 13 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module github.com/deanishe/alfred-safari-assistant

require (
github.com/DHowett/go-plist v0.0.0-20180609054337-500bd5b9081b // indirect
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc // indirect
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf // indirect
github.com/deanishe/awgo v0.0.0-20180708154148-fda4e59dbe69
github.com/deanishe/go-safari v0.0.0-20181020143051-15f91b5d844c
github.com/juju/deputy v0.0.0-20161007041147-5e10e7deaf1c
github.com/mattn/go-sqlite3 v1.9.0 // indirect
golang.org/x/text v0.3.0 // indirect
gopkg.in/alecthomas/kingpin.v2 v2.2.6
)
18 changes: 18 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
github.com/DHowett/go-plist v0.0.0-20180609054337-500bd5b9081b h1:WFNhl1+1ofCWWdNFEhut77cmuMXjJYYvkEVloDdaUCI=
github.com/DHowett/go-plist v0.0.0-20180609054337-500bd5b9081b/go.mod h1:5paT5ZDrOm8eAJPem2Bd+q3FTi3Gxm/U4tb2tH8YIUQ=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc h1:cAKDfWh5VpdgMhJosfJnn5/FoN2SRZ4p7fJNX58YPaU=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf h1:qet1QNfXsQxTZqLG4oE62mJzwPIB8+Tee4RNCL9ulrY=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/deanishe/awgo v0.0.0-20180708154148-fda4e59dbe69 h1:Kmt/ire64P+C3szOGa7DJ+NaF1fR9bOIZrOQ4kFgjTI=
github.com/deanishe/awgo v0.0.0-20180708154148-fda4e59dbe69/go.mod h1:iS04UkOlaot9B69n8pPeXb804n4vxgDGl3QjXybu4nM=
github.com/deanishe/go-safari v0.0.0-20181020143051-15f91b5d844c h1:/p8hmXqvjROrSoyd1p9kQTpsx0umG7qFoZbwHBNFMno=
github.com/deanishe/go-safari v0.0.0-20181020143051-15f91b5d844c/go.mod h1:EKPpW10YX70yPv6pCvxUH2xHxbkd+EXR010J943NicE=
github.com/juju/deputy v0.0.0-20161007041147-5e10e7deaf1c h1:P2DJ4J0PCWYIiNLjNY/Iq6sk1m/HcvAgVWGyVYRxLns=
github.com/juju/deputy v0.0.0-20161007041147-5e10e7deaf1c/go.mod h1:0CRTVyTLGPTjnUC6o3jNmzJiWmMv+tfKW8saKZ7ihzc=
github.com/mattn/go-sqlite3 v1.9.0 h1:pDRiWfl+++eC2FEFRy6jXmQlvp4Yh3z1MJKg4UeYM/4=
github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
2 changes: 1 addition & 1 deletion history.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func doFilterHistory() error {
showUpdateStatus()

history.MaxSearchResults = maxResults * 10 // allow for lots of duplicates
wf.MaxResults = maxResults
wf.Configure(aw.MaxResults(maxResults))

entries, err := history.Search(query)
if err != nil {
Expand Down
4 changes: 3 additions & 1 deletion info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3276,6 +3276,8 @@ Configuration
`ALSF_INCLUDE_BOOKMARKLETS`: Set to `1` to include bookmarklets in the default bookmark search.
`ALSF_SEARCH_HOSTNAMES`: Set to `1` to also search bookmark/history/tab hostnames in addition to titles.
`ALSF_TAB_*`: Bind an action (script)/bookmarklet to a modifier key. Use MOD+↩ to run this action/bookmarklet on a tab.
For a script, use the name (minus extension). For a bookmarklet, use `bkm:UID` where `UID` is the UID of the bookmarklet.
Expand Down Expand Up @@ -4278,7 +4280,7 @@ Filter all bookmark folders</string>
<string>Open in Current Tab</string>
</dict>
<key>version</key>
<string>0.5</string>
<string>0.5.1</string>
<key>webaddress</key>
<string>https://github.com/deanishe/alfred-safari-assistant/blob/master/README.md</string>
</dict>
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// sheet in Alfred Preferences.
//
// See https://github.com/deanishe/alfred-safari-assistant for usage instructions.
package main
package main // import "github.com/deanishe/alfred-safari-assistant"

import (
"fmt"
Expand Down Expand Up @@ -270,7 +270,7 @@ func doFilterURLActions() error {

// doURLAction performs an action on a URL.
func doURLAction() error {
wf.TextErrors = true
wf.Configure(aw.TextErrors(true))

log.Printf("URL=%s, action=%s", actionURL, action)

Expand Down Expand Up @@ -388,7 +388,7 @@ func run() {
if err != nil {
wf.FatalError(err)
}
wf.MaxResults = maxResults
wf.Configure(aw.MaxResults(maxResults))

// Create user script directories
util.MustExist(filepath.Join(wf.DataDir(), "scripts", "tab"))
Expand Down Expand Up @@ -442,7 +442,7 @@ func run() {
err = doURLAction()

case runTabActionCmd.FullCommand():
wf.TextErrors = true
wf.Configure(aw.TextErrors(true))
err = doTabAction()

case activeTabCmd.FullCommand():
Expand Down
4 changes: 2 additions & 2 deletions tabs.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
// Activate the specified window (and tab).
func doActivate() error {

wf.TextErrors = true
wf.Configure(aw.TextErrors(true))

log.Printf("Activating %dx%d", winIdx, tabIdx)

Expand Down Expand Up @@ -52,7 +52,7 @@ func doFilterTabActions() error {

// doTabAction performs an action on a tab.
func doTabAction() error {
wf.TextErrors = true
wf.Configure(aw.TextErrors(true))

var (
err error
Expand Down
4 changes: 2 additions & 2 deletions update.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ func doUpdate() error {

// checkForUpdate runs "./alsf update" in the background if an update check is due.
func checkForUpdate() error {
if !wf.UpdateCheckDue() || aw.IsRunning("update") {
if !wf.UpdateCheckDue() || wf.IsRunning("update") {
return nil
}
cmd := exec.Command(os.Args[0], "update")
return aw.RunInBackground("update", cmd)
return wf.RunInBackground("update", cmd)
}

// showUpdateStatus adds an "update available!" message to Script Filters if an update is available
Expand Down
39 changes: 39 additions & 0 deletions vendor/github.com/DHowett/go-plist/.gitlab-ci.yml

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

58 changes: 58 additions & 0 deletions vendor/github.com/DHowett/go-plist/LICENSE

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

21 changes: 21 additions & 0 deletions vendor/github.com/DHowett/go-plist/README.md

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

26 changes: 26 additions & 0 deletions vendor/github.com/DHowett/go-plist/bplist.go

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

Loading

0 comments on commit cb7f73d

Please sign in to comment.