mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
14 lines
275 B
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
|
|
}
|