diff options
| author | Jonathan Amsterdam <jba@google.com> | 2022-06-16 10:02:13 -0400 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2022-06-17 13:49:06 +0000 |
| commit | 24f94ffc546bde6aae0552efa6a940041d9d28e1 (patch) | |
| tree | 3607dc309feaea10e46edf7ddb08f6ffc56fcfa2 /devtools/cmd/css | |
| parent | b5c314cef9530a0e1bb204d957842f49a256bf66 (diff) | |
| download | go-x-pkgsite-24f94ffc546bde6aae0552efa6a940041d9d28e1.tar.xz | |
many: re-enable staticcheck and fix problems
Most of the checks were about io/ioutil. There were a couple of
other minor ones. I didn't address the check for strings.Title;
instead, I turned off that check globally with a staticcheck.conf
file.
Change-Id: I286a6894fb1fd891818ab9e451c891f52a3828fc
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/412675
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'devtools/cmd/css')
| -rw-r--r-- | devtools/cmd/css/main.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/devtools/cmd/css/main.go b/devtools/cmd/css/main.go index 53e517a6..187ebe42 100644 --- a/devtools/cmd/css/main.go +++ b/devtools/cmd/css/main.go @@ -14,7 +14,6 @@ import ( "bufio" "flag" "fmt" - "io/ioutil" "log" "net/http" "os" @@ -87,8 +86,8 @@ func main() { log.Fatal(err) } - if err := ioutil.WriteFile(cssFile, []byte(copyright), 0644); err != nil { - log.Fatalf("ioutil.WriteFile(f, '', 0644): %v", err) + if err := os.WriteFile(cssFile, []byte(copyright), 0644); err != nil { + log.Fatalf("os.WriteFile(f, '', 0644): %v", err) } file, err := os.OpenFile(cssFile, os.O_WRONLY|os.O_APPEND, 0644) |
