Skip to content

Commit

Permalink
Remove deprecated function (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi-g80 authored Nov 14, 2024
1 parent 7e7ad00 commit bc9591a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ build: clean
mkdir $(BUILD)
go build -v -ldflags=$(LDFLAGS) -o $(BUILD)/$(BINARY)

build-race: clean
$(info **************** building binaries ****************)
mkdir $(BUILD)
go build -v -race -ldflags=$(LDFLAGS) -o $(BUILD)/$(BINARY)-race

clean:
$(info **************** house keeping ********************)
rm -rf $(BIN)
Expand Down
4 changes: 2 additions & 2 deletions server/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"embed"
"fmt"
"html"
"io"
"io/fs"
"io/ioutil"
"math/rand"
"net/http"
"strings"
Expand Down Expand Up @@ -108,7 +108,7 @@ func pastePostHandler(c echo.Context) error {
}

func pastePutHandler(c echo.Context) error {
value, err := ioutil.ReadAll(c.Request().Body)
value, err := io.ReadAll(c.Request().Body)
if err != nil {
return fmt.Errorf("while reading body: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion server/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package server

// Version string
const Version string = "1.2.0"
const Version string = "1.2.1"
2 changes: 1 addition & 1 deletion server/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

func TestVersion(t *testing.T) {
var version string = "1.2.0"
var version string = "1.2.1"

if version != Version {
t.Errorf("expected version %s, got %s", version, Version)
Expand Down

0 comments on commit bc9591a

Please sign in to comment.