mirror of
https://github.com/securego/gosec.git
synced 2025-03-01 04:33:29 +00:00
Fix compilation errors in the test samples
Signed-off-by: Cosmin Cojocar <ccojocar@cloudbees.com>
This commit is contained in:
parent
23ef7009f9
commit
a5911ad7bb
1 changed files with 7 additions and 4 deletions
|
@ -582,7 +582,6 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/http/pprof"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -1632,8 +1631,11 @@ import (
|
|||
|
||||
func main() {
|
||||
repoFile := "path_of_file"
|
||||
relFile := filepath.Rel(repoFile)
|
||||
_, err := os.OpenFile(relFile, os.O_RDONLY, 0600)
|
||||
relFile, err := filepath.Rel("./", repoFile)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
_, err = os.OpenFile(relFile, os.O_RDONLY, 0600)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
@ -2229,10 +2231,11 @@ func printVector() {
|
|||
fmt.Println()
|
||||
}
|
||||
|
||||
func foo() (int, *string, string) {
|
||||
func foo() (int, **string, *string) {
|
||||
for _, item := range vector {
|
||||
return 0, &item, item
|
||||
}
|
||||
return 0, nil, nil
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
|
Loading…
Reference in a new issue