frp/tests/config/config.go

14 lines
275 B
Go
Raw Normal View History

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