You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
frp/tests/config/config.go

14 lines
275 B
Go

package config
import (
"io/ioutil"
"os"
"path/filepath"
)
func GenerateConfigFile(path string, content string) (realPath string, err error) {
realPath = filepath.Join(os.TempDir(), path)
err = ioutil.WriteFile(realPath, []byte(content), 0666)
return realPath, err
}