Skip to content
Snippets Groups Projects
Commit 96309973 authored by Aleksander Einarsen's avatar Aleksander Einarsen
Browse files

#21 Removed unused code

parent f340208b
No related tags found
No related merge requests found
...@@ -9,8 +9,6 @@ import ( ...@@ -9,8 +9,6 @@ import (
"runtime" "runtime"
) )
const prompt = "Hello!"
func main() { func main() {
runHandler() runHandler()
} }
...@@ -33,8 +31,6 @@ func promptHandler(w http.ResponseWriter, r *http.Request) { ...@@ -33,8 +31,6 @@ func promptHandler(w http.ResponseWriter, r *http.Request) {
finalOutput := removeANSI(string(output)) finalOutput := removeANSI(string(output))
finalOutput = fmt.Sprintf("%s", finalOutput) finalOutput = fmt.Sprintf("%s", finalOutput)
//outputString := string(output)
//_, err = fmt.Fprintln(w, output)
_, err = w.Write([]byte(finalOutput)) _, err = w.Write([]byte(finalOutput))
if err != nil { if err != nil {
log.Println("Error writing response: ", err) log.Println("Error writing response: ", err)
...@@ -58,15 +54,6 @@ func runHandler() { ...@@ -58,15 +54,6 @@ func runHandler() {
log.Fatal(http.ListenAndServe(":8080", nil)) log.Fatal(http.ListenAndServe(":8080", nil))
} }
func getCommand() *exec.Cmd {
if runtime.GOOS == "windows" {
return exec.Command("cmd", "/C", "echo", "Hello, World!")
} else if runtime.GOOS == "linux" {
return exec.Command("echo", "Hello, World!")
} else {
panic("Unsupported OS")
}
}
func getOllamaCmd(prompt string) *exec.Cmd { func getOllamaCmd(prompt string) *exec.Cmd {
log.Println("Starting Ollama...") log.Println("Starting Ollama...")
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment