1
0

symlink_win.go 461 B

12345678910111213141516171819
  1. //go:build windows
  2. package nginx
  3. import "strings"
  4. // fix #1046
  5. // nginx.conf include sites-enabled/*.conf
  6. // sites-enabled/example.com.conf -> example.com.conf.conf
  7. // GetConfSymlinkPath returns the path of the symlink file
  8. func GetConfSymlinkPath(path string) string {
  9. return path + ".conf"
  10. }
  11. // GetConfNameBySymlinkName returns the name of the symlink file
  12. func GetConfNameBySymlinkName(name string) string {
  13. return strings.TrimSuffix(name, ".conf")
  14. }