forked from sloum/bombadillo
Ran format on each file
This commit is contained in:
parent
2038c9c4ac
commit
e4f7147e4f
|
@ -132,7 +132,6 @@ func (b Bookmarks) Render(termwidth, termheight int) []string {
|
||||||
// either here with a scroll up/down or in the client
|
// either here with a scroll up/down or in the client
|
||||||
// code for scroll
|
// code for scroll
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------\\
|
//------------------------------------------------\\
|
||||||
// + + + F U N C T I O N S + + + \\
|
// + + + F U N C T I O N S + + + \\
|
||||||
//--------------------------------------------------\\
|
//--------------------------------------------------\\
|
||||||
|
@ -140,4 +139,3 @@ func (b Bookmarks) Render(termwidth, termheight int) []string {
|
||||||
func MakeBookmarks() Bookmarks {
|
func MakeBookmarks() Bookmarks {
|
||||||
return Bookmarks{false, false, 0, 0, make([]string, 0), make([]string, 0)}
|
return Bookmarks{false, false, 0, 0, make([]string, 0), make([]string, 0)}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -877,7 +877,6 @@ func (c *client) Visit(url string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// +++ Begin Protocol Handlers +++
|
// +++ Begin Protocol Handlers +++
|
||||||
|
|
||||||
func (c *client) handleGopher(u Url) {
|
func (c *client) handleGopher(u Url) {
|
||||||
|
@ -1049,7 +1048,6 @@ func (c *client) handleWeb(u Url) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------\\
|
//------------------------------------------------\\
|
||||||
// + + + F U N C T I O N S + + + \\
|
// + + + F U N C T I O N S + + + \\
|
||||||
//--------------------------------------------------\\
|
//--------------------------------------------------\\
|
||||||
|
@ -1075,4 +1073,3 @@ func findAvailableFileName(fpath, fname string) (string, error) {
|
||||||
|
|
||||||
return savePath, nil
|
return savePath, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1 @@
|
||||||
package cui
|
package cui
|
||||||
|
|
||||||
import (
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
|
@ -29,4 +29,3 @@ var defaultOptions = map[string]string{
|
||||||
"tlskey": "",
|
"tlskey": "",
|
||||||
"lynxmode": "false",
|
"lynxmode": "false",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ package finger
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"net"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------\\
|
//------------------------------------------------\\
|
||||||
// + + + T Y P E S + + + \\
|
// + + + T Y P E S + + + \\
|
||||||
//--------------------------------------------------\\
|
//--------------------------------------------------\\
|
||||||
|
@ -15,7 +14,6 @@ type Footbar struct {
|
||||||
PageType string
|
PageType string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------\\
|
//------------------------------------------------\\
|
||||||
// + + + R E C E I V E R S + + + \\
|
// + + + R E C E I V E R S + + + \\
|
||||||
//--------------------------------------------------\\
|
//--------------------------------------------------\\
|
||||||
|
@ -42,7 +40,6 @@ func (f *Footbar) Render(termWidth, position int, theme string) string {
|
||||||
return fmt.Sprintf(out, termWidth-1, termWidth-1, pre)
|
return fmt.Sprintf(out, termWidth-1, termWidth-1, pre)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------\\
|
//------------------------------------------------\\
|
||||||
// + + + F U N C T I O N S + + + \\
|
// + + + F U N C T I O N S + + + \\
|
||||||
//--------------------------------------------------\\
|
//--------------------------------------------------\\
|
||||||
|
@ -50,4 +47,3 @@ func (f *Footbar) Render(termWidth, position int, theme string) string {
|
||||||
func MakeFootbar() Footbar {
|
func MakeFootbar() Footbar {
|
||||||
return Footbar{"---", "N/A"}
|
return Footbar{"---", "N/A"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,6 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
type Capsule struct {
|
type Capsule struct {
|
||||||
MimeMaj string
|
MimeMaj string
|
||||||
MimeMin string
|
MimeMin string
|
||||||
|
@ -20,13 +19,11 @@ type Capsule struct {
|
||||||
Links []string
|
Links []string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type TofuDigest struct {
|
type TofuDigest struct {
|
||||||
certs map[string]string
|
certs map[string]string
|
||||||
ClientCert tls.Certificate
|
ClientCert tls.Certificate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------\\
|
//------------------------------------------------\\
|
||||||
// + + + R E C E I V E R S + + + \\
|
// + + + R E C E I V E R S + + + \\
|
||||||
//--------------------------------------------------\\
|
//--------------------------------------------------\\
|
||||||
|
@ -143,8 +140,6 @@ func (t *TofuDigest) IniDump() string {
|
||||||
return out.String()
|
return out.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------\\
|
//------------------------------------------------\\
|
||||||
// + + + F U N C T I O N S + + + \\
|
// + + + F U N C T I O N S + + + \\
|
||||||
//--------------------------------------------------\\
|
//--------------------------------------------------\\
|
||||||
|
@ -398,7 +393,6 @@ func hashCert(cert []byte) string {
|
||||||
return fmt.Sprintf("%s", string(bytes.Join(hex, []byte(":"))))
|
return fmt.Sprintf("%s", string(bytes.Join(hex, []byte(":"))))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func MakeCapsule() Capsule {
|
func MakeCapsule() Capsule {
|
||||||
return Capsule{"", "", 0, "", make([]string, 0, 5)}
|
return Capsule{"", "", 0, "", make([]string, 0, 5)}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,6 @@ func Visit(gophertype, host, port, resource string) (string, []string, error) {
|
||||||
return text, []string{}, nil
|
return text, []string{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if gophertype == "1" {
|
if gophertype == "1" {
|
||||||
text, links = parseMap(text)
|
text, links = parseMap(text)
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@ type Headbar struct {
|
||||||
url string
|
url string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------\\
|
//------------------------------------------------\\
|
||||||
// + + + R E C E I V E R S + + + \\
|
// + + + R E C E I V E R S + + + \\
|
||||||
//--------------------------------------------------\\
|
//--------------------------------------------------\\
|
||||||
|
@ -27,7 +26,6 @@ func (h *Headbar) Render(width int, theme string) string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------\\
|
//------------------------------------------------\\
|
||||||
// + + + F U N C T I O N S + + + \\
|
// + + + F U N C T I O N S + + + \\
|
||||||
//--------------------------------------------------\\
|
//--------------------------------------------------\\
|
||||||
|
@ -35,4 +33,3 @@ func (h *Headbar) Render(width int, theme string) string {
|
||||||
func MakeHeadbar(title string) Headbar {
|
func MakeHeadbar(title string) Headbar {
|
||||||
return Headbar{title, ""}
|
return Headbar{title, ""}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,4 +89,3 @@ func Fetch(url string) ([]byte, error) {
|
||||||
|
|
||||||
return bodyBytes, nil
|
return bodyBytes, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ func Open(address string) (string, error) {
|
||||||
}
|
}
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
||||||
|
|
||||||
if pathIsDir(address) {
|
if pathIsDir(address) {
|
||||||
fileList, err := file.Readdirnames(0)
|
fileList, err := file.Readdirnames(0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -40,7 +39,6 @@ func Open(address string) (string, error) {
|
||||||
return string(bytes), nil
|
return string(bytes), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func pathExists(p string) bool {
|
func pathExists(p string) bool {
|
||||||
exists := true
|
exists := true
|
||||||
|
|
||||||
|
|
1
page.go
1
page.go
|
@ -89,4 +89,3 @@ func MakePage(url Url, content string, links []string) Page {
|
||||||
p := Page{make([]string, 0), content, links, url, 0}
|
p := Page{make([]string, 0), content, links, url, 0}
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
3
pages.go
3
pages.go
|
@ -14,7 +14,6 @@ type Pages struct {
|
||||||
History [20]Page
|
History [20]Page
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------\\
|
//------------------------------------------------\\
|
||||||
// + + + R E C E I V E R S + + + \\
|
// + + + R E C E I V E R S + + + \\
|
||||||
//--------------------------------------------------\\
|
//--------------------------------------------------\\
|
||||||
|
@ -83,5 +82,3 @@ func (p *Pages) Render(termHeight, termWidth int) []string {
|
||||||
func MakePages() Pages {
|
func MakePages() Pages {
|
||||||
return Pages{-1, 0, [20]Page{}}
|
return Pages{-1, 0, [20]Page{}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
4
url.go
4
url.go
|
@ -28,12 +28,10 @@ type Url struct {
|
||||||
|
|
||||||
// There are currently no receivers for the Url struct
|
// There are currently no receivers for the Url struct
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------\\
|
//------------------------------------------------\\
|
||||||
// + + + F U N C T I O N S + + + \\
|
// + + + F U N C T I O N S + + + \\
|
||||||
//--------------------------------------------------\\
|
//--------------------------------------------------\\
|
||||||
|
|
||||||
|
|
||||||
// MakeUrl is a Url constructor that takes in a string
|
// MakeUrl is a Url constructor that takes in a string
|
||||||
// representation of a url and returns a Url struct and
|
// representation of a url and returns a Url struct and
|
||||||
// an error (or nil).
|
// an error (or nil).
|
||||||
|
@ -167,5 +165,3 @@ func parseFinger(u string) (Url, error) {
|
||||||
out.Full = fmt.Sprintf("%s://%s%s:%s", out.Scheme, resource, out.Host, out.Port)
|
out.Full = fmt.Sprintf("%s://%s%s:%s", out.Scheme, resource, out.Host, out.Port)
|
||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue