frp/tests/config/config.go

14 lines
275 B
Go
Raw Normal View History

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