Skip to content

Commit

Permalink
Update launchpad/main.go
Browse files Browse the repository at this point in the history
Co-authored-by: warber <72415058+warber@users.noreply.github.com>
Signed-off-by: Simon Schrottner <simon.schrottner@dynatrace.com>
  • Loading branch information
aepfli and warber committed Jan 19, 2025
1 parent 2366b70 commit 551d5d2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions launchpad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -137,7 +136,7 @@ func changeHandler(w http.ResponseWriter, r *http.Request) {
}

// Write the updated JSON back to the file
if err := ioutil.WriteFile(configFile, updatedData, 0644); err != nil {
if err := os.WriteFile(configFile, updatedData, 0644); err != nil {
http.Error(w, fmt.Sprintf("Failed to write updated file: %v", err), http.StatusInternalServerError)
return
}
Expand Down

0 comments on commit 551d5d2

Please sign in to comment.