1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-05-27 23:08:02 +02:00

apply formatting

This commit is contained in:
John Shin 2022-06-11 23:23:22 -07:00
parent 3067c2c321
commit 4d54b3801f

View File

@ -1,26 +1,26 @@
package config
import (
"io/ioutil"
"strings"
"io/ioutil"
"strings"
)
func isWSL() bool {
data, err := ioutil.ReadFile("/proc/sys/kernel/osrelease");
return err == nil && strings.Contains(string(data), "microsoft")
data, err := ioutil.ReadFile("/proc/sys/kernel/osrelease")
return err == nil && strings.Contains(string(data), "microsoft")
}
// GetPlatformDefaultConfig gets the defaults for the platform
func GetPlatformDefaultConfig() OSConfig {
if isWSL() {
return OSConfig{
EditCommand: ``,
EditCommandTemplate: "",
OpenCommand: `powershell.exe start explorer.exe {{filename}} >/dev/null`,
OpenLinkCommand: `powershell.exe start {{link}} >/dev/null`,
}
}
if isWSL() {
return OSConfig{
EditCommand: ``,
EditCommandTemplate: "",
OpenCommand: `powershell.exe start explorer.exe {{filename}} >/dev/null`,
OpenLinkCommand: `powershell.exe start {{link}} >/dev/null`,
}
}
return OSConfig{
EditCommand: ``,