Skip to content

Commit

Permalink
upgrade to butane 0.20.0 and mux 1.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zyclonite committed Feb 28, 2024
1 parent d082665 commit bc66b02
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN cd src \
FROM scratch

LABEL org.opencontainers.image.title="fcct-service" \
org.opencontainers.image.version="0.19.0" \
org.opencontainers.image.version="0.20.0" \
org.opencontainers.image.description="FCCT (butane) as a Service" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.source="https://github.com/zyclonite/fcct-service"
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"encoding/json"
"io/ioutil"
"io"
"log"
"net/http"
"strconv"
Expand All @@ -25,7 +25,7 @@ func transpile(w http.ResponseWriter, r *http.Request) {
}

w.Header().Set("Content-Type", "application/json")
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
if err != nil {
log.Printf("Error reading body: %v", err)
w.WriteHeader(http.StatusBadRequest)
Expand Down Expand Up @@ -60,7 +60,7 @@ func transpile(w http.ResponseWriter, r *http.Request) {

func validate(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)
if err != nil {
log.Printf("Error reading body: %v", err)
w.WriteHeader(http.StatusBadRequest)
Expand Down
6 changes: 3 additions & 3 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"bytes"
"io/ioutil"
"io"
"net/http"
"net/http/httptest"
"os"
Expand All @@ -16,7 +16,7 @@ func TestValidConfig(t *testing.T) {
}
defer infile.Close()

dataIn, err := ioutil.ReadAll(infile)
dataIn, err := io.ReadAll(infile)
if err != nil {
t.Fatalf("failed to read %s: %v\n", infile.Name(), err)
}
Expand Down Expand Up @@ -45,7 +45,7 @@ func TestInvalidConfig(t *testing.T) {
}
defer infile.Close()

dataIn, err := ioutil.ReadAll(infile)
dataIn, err := io.ReadAll(infile)
if err != nil {
t.Fatalf("failed to read %s: %v\n", infile.Name(), err)
}
Expand Down

0 comments on commit bc66b02

Please sign in to comment.