frp/tests/config/config.go

14 lines
275 B
Go
Raw Normal View History

2018-07-11 16:31:21 +00:00
package config
2018-07-11 15:27:47 +00:00
import (
"io/ioutil"
2018-07-11 16:31:21 +00:00
"os"
"path/filepath"
2018-07-11 15:27:47 +00:00
)
2018-07-11 16:31:21 +00:00
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
2018-07-11 15:27:47 +00:00
}