Simple fix applied, expanded error message, gofmt
This commit is contained in:
parent
66acf6102f
commit
1045829076
10
client.go
10
client.go
|
@ -35,7 +35,6 @@ type client struct {
|
|||
Certs gemini.TofuDigest
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------\\
|
||||
// + + + R E C E I V E R S + + + \\
|
||||
//--------------------------------------------------\\
|
||||
|
@ -239,7 +238,6 @@ func (c *client) TakeControlInput() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
func (c *client) routeCommandInput(com *cmdparse.Command) error {
|
||||
var err error
|
||||
switch com.Type {
|
||||
|
@ -470,7 +468,6 @@ func (c *client) doLinkCommandAs(action, target string, values []string) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
func (c *client) getCurrentPageUrl() (string, error) {
|
||||
if c.PageState.Length < 1 {
|
||||
return "", fmt.Errorf("There are no pages in history")
|
||||
|
@ -506,10 +503,10 @@ func (c *client) saveFile(u Url, name string) {
|
|||
c.DrawMessage()
|
||||
return
|
||||
}
|
||||
savePath := c.Options["savelocation"] + name
|
||||
savePath := c.Options["savelocation"] + "/" + name
|
||||
err = ioutil.WriteFile(savePath, file, 0644)
|
||||
if err != nil {
|
||||
c.SetMessage("Error writing file to disk", true)
|
||||
c.SetMessage("Error writing file: "+err.Error(), true)
|
||||
c.DrawMessage()
|
||||
return
|
||||
}
|
||||
|
@ -541,7 +538,6 @@ func (c *client) doLinkCommand(action, target string) {
|
|||
c.DrawMessage()
|
||||
}
|
||||
|
||||
|
||||
switch action {
|
||||
case "DELETE", "D":
|
||||
msg, err := c.BookMarks.Delete(num)
|
||||
|
@ -972,7 +968,6 @@ func (c *client) Visit(url string) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------\\
|
||||
// + + + F U N C T I O N S + + + \\
|
||||
//--------------------------------------------------\\
|
||||
|
@ -981,4 +976,3 @@ func MakeClient(name string) *client {
|
|||
c := client{0, 0, defaultOptions, "", false, MakePages(), MakeBookmarks(), MakeHeadbar(name), MakeFootbar(), gemini.MakeTofuDigest()}
|
||||
return &c
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue