Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
aymanbagabas committed Jul 9, 2024
1 parent 062918d commit 16b0dd8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"flag"
"fmt"
"io/ioutil"
"net/http"
"os"
"text/template"
Expand Down Expand Up @@ -32,7 +31,7 @@ func main() {
os.Exit(1)
}

tplIn, err := ioutil.ReadFile(flag.Args()[0])
tplIn, err := os.ReadFile(flag.Args()[0])
if err != nil {
fmt.Println("Can't read file:", err)
os.Exit(1)
Expand Down
11 changes: 0 additions & 11 deletions template.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"fmt"
"reflect"
"time"

"github.com/dustin/go-humanize"
Expand All @@ -23,13 +22,3 @@ func humanized(t interface{}) string {
return fmt.Sprintf("%v", t)
}
}

func reverse(s interface{}) interface{} {
n := reflect.ValueOf(s).Len()
swap := reflect.Swapper(s)
for i, j := 0, n-1; i < j; i, j = i+1, j-1 {
swap(i, j)
}

return s
}

0 comments on commit 16b0dd8

Please sign in to comment.