Skip to content

Instantly share code, notes, and snippets.

@gleeblezoid
Created August 26, 2021 09:01
Show Gist options
  • Save gleeblezoid/21b1cf3ee9753e60364d9fcaa430c3c5 to your computer and use it in GitHub Desktop.
Save gleeblezoid/21b1cf3ee9753e60364d9fcaa430c3c5 to your computer and use it in GitHub Desktop.
For searching with multiple search engines at once from your terminal
/* The idea of this tool is to run multiple web searches at the same time - say several shopping sites or knowledge bases */
package main
import (
"fmt"
"github.com/pkg/browser"
"strings"
)
func main() {
var MySearch string
fmt.Println("Try searching for something:")
fmt.Scanln(&MySearch)
engines := []string{"https://en.wikipedia.org/wiki/MySearch", "https://www.ecosia.org/search?q=MySearch"}
for v := range engines {
engines[v] = strings.ReplaceAll(engines[v], "MySearch", MySearch)
fmt.Println(engines[v])
browser.OpenURL(string(engines[v]))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment