Change-Id: I251788cbbb6d740ef24e7561cc4bee880b7bdff8
Reviewed-on: https://go-review.googlesource.com/c/go/+/485017
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
import (
"encoding/json"
"fmt"
- "io/ioutil"
+ "io"
"log"
"net/http"
"os"
accessDir = path.Dir(accessDir)
}
- data, err := ioutil.ReadAll(accessFile)
+ data, err := io.ReadAll(accessFile)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
import (
"fmt"
- "io/ioutil"
"log"
"net/http"
"net/http/cgi"
cgiPath := db + ".cgi"
cgiScript := fmt.Sprintf("#!%s\nrepository: %s\n", h.fossilPath, db)
- if err := ioutil.WriteFile(cgiPath, []byte(cgiScript), 0755); err != nil {
+ if err := os.WriteFile(cgiPath, []byte(cgiScript), 0755); err != nil {
return nil, err
}