mirror of https://github.com/liamg/aminal.git
Fix various gofmt issues
Not sure how some of these crept in.
This commit is contained in:
parent
043dc161ce
commit
7e248cb1d4
|
@ -85,7 +85,7 @@ func New(pty platform.Pty, logger *zap.SugaredLogger, config *config.Config) *Te
|
||||||
ShowCursor: true,
|
ShowCursor: true,
|
||||||
},
|
},
|
||||||
platformDependentSettings: pty.GetPlatformDependentSettings(),
|
platformDependentSettings: pty.GetPlatformDependentSettings(),
|
||||||
dirty: newNotifier(),
|
dirty: newNotifier(),
|
||||||
}
|
}
|
||||||
t.buffers = []*buffer.Buffer{
|
t.buffers = []*buffer.Buffer{
|
||||||
buffer.NewBuffer(t.terminalState, t.dirty),
|
buffer.NewBuffer(t.terminalState, t.dirty),
|
||||||
|
|
|
@ -5,18 +5,18 @@ package main
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"errors"
|
"errors"
|
||||||
"golang.org/x/sys/windows/registry"
|
|
||||||
"os"
|
|
||||||
"os/user"
|
|
||||||
"strings"
|
|
||||||
"path/filepath"
|
|
||||||
"github.com/liamg/aminal/windows/winutil"
|
|
||||||
"github.com/liamg/aminal/generated-src/installer/data"
|
|
||||||
"text/template"
|
|
||||||
"io/ioutil"
|
|
||||||
"os/exec"
|
|
||||||
"syscall"
|
|
||||||
"flag"
|
"flag"
|
||||||
|
"github.com/liamg/aminal/generated-src/installer/data"
|
||||||
|
"github.com/liamg/aminal/windows/winutil"
|
||||||
|
"golang.org/x/sys/windows/registry"
|
||||||
|
"io/ioutil"
|
||||||
|
"os"
|
||||||
|
"os/exec"
|
||||||
|
"os/user"
|
||||||
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
"syscall"
|
||||||
|
"text/template"
|
||||||
)
|
)
|
||||||
|
|
||||||
const Version = "VERSION"
|
const Version = "VERSION"
|
||||||
|
@ -116,7 +116,7 @@ func createRegistryKeysForUninstaller(installDir string, isUserInstall bool) {
|
||||||
func updateVersionInRegistry(isUserInstall bool) {
|
func updateVersionInRegistry(isUserInstall bool) {
|
||||||
regRoot := getRegistryRoot(isUserInstall)
|
regRoot := getRegistryRoot(isUserInstall)
|
||||||
updateKey := `Software\Aminal\Update\Clients\` + ProductId
|
updateKey := `Software\Aminal\Update\Clients\` + ProductId
|
||||||
writeRegStr(regRoot, updateKey, "pv", Version + ".0")
|
writeRegStr(regRoot, updateKey, "pv", Version+".0")
|
||||||
writeRegStr(regRoot, updateKey, "name", "Aminal")
|
writeRegStr(regRoot, updateKey, "name", "Aminal")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ func getRegistryRoot(isUserInstall bool) registry.Key {
|
||||||
}
|
}
|
||||||
|
|
||||||
func writeRegStr(regRoot registry.Key, keyPath string, valueName string, value string) {
|
func writeRegStr(regRoot registry.Key, keyPath string, valueName string, value string) {
|
||||||
const mode = registry.WRITE|registry.WOW64_32KEY
|
const mode = registry.WRITE | registry.WOW64_32KEY
|
||||||
key, _, err := registry.CreateKey(regRoot, keyPath, mode)
|
key, _, err := registry.CreateKey(regRoot, keyPath, mode)
|
||||||
check(err)
|
check(err)
|
||||||
defer key.Close()
|
defer key.Close()
|
||||||
|
@ -154,7 +154,7 @@ func getStartMenuDir(isUserInstall bool) string {
|
||||||
|
|
||||||
func createShortcut(linkPath, targetPath string) {
|
func createShortcut(linkPath, targetPath string) {
|
||||||
type Shortcut struct {
|
type Shortcut struct {
|
||||||
LinkPath string
|
LinkPath string
|
||||||
TargetPath string
|
TargetPath string
|
||||||
}
|
}
|
||||||
tmpl := template.New("createLnk.vbs")
|
tmpl := template.New("createLnk.vbs")
|
||||||
|
@ -215,4 +215,4 @@ func check(e error) {
|
||||||
if e != nil {
|
if e != nil {
|
||||||
panic(e)
|
panic(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/liamg/aminal/windows/winutil"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
@ -26,12 +27,11 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"github.com/liamg/aminal/windows/winutil"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Version struct {
|
type Version struct {
|
||||||
number [3]int
|
number [3]int
|
||||||
name string
|
name string
|
||||||
}
|
}
|
||||||
type Versions []Version
|
type Versions []Version
|
||||||
|
|
||||||
|
@ -121,4 +121,4 @@ func check(e error) {
|
||||||
if e != nil {
|
if e != nil {
|
||||||
panic(e)
|
panic(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,4 +24,4 @@ func GetExecutablePath() (string, error) {
|
||||||
return "", e1
|
return "", e1
|
||||||
}
|
}
|
||||||
return string(utf16.Decode(b[0:n])), nil
|
return string(utf16.Decode(b[0:n])), nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue