Created
August 26, 2021 09:01
-
-
Save gleeblezoid/21b1cf3ee9753e60364d9fcaa430c3c5 to your computer and use it in GitHub Desktop.
For searching with multiple search engines at once from your terminal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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