prysm-pulse/tools/analyzers/properpermissions/testdata/custom_imports.go
Victor Farazdagi 386b69f473
Fix comments (#8802)
* fix incorrect exported name in comments

* add comments to exported methods
2021-04-23 12:06:05 +00:00

20 lines
646 B
Go

package testdata
import (
"crypto/rand"
"fmt"
ioAlias "io/ioutil"
"math/big"
osAlias "os"
"path/filepath"
)
// UseAliasedPackages --
func UseAliasedPackages() {
randPath, _ := rand.Int(rand.Reader, big.NewInt(1000000))
p := filepath.Join(tempDir(), fmt.Sprintf("/%d", randPath))
_ = osAlias.MkdirAll(p, osAlias.ModePerm) // want "os and ioutil dir and file writing functions are not permissions-safe, use shared/fileutil"
someFile := filepath.Join(p, "some.txt")
_ = ioAlias.WriteFile(someFile, []byte("hello"), osAlias.ModePerm) // want "os and ioutil dir and file writing functions are not permissions-safe, use shared/fileutil"
}