Commit 3e383a7a authored by Ma_124's avatar Ma_124

GoFmt

parent bb81c5ce
Pipeline #46606620 passed with stages
in 1 minute and 58 seconds
package awesomefw
import (
"strings"
"github.com/kballard/go-shellquote"
"errors"
"fmt"
"github.com/kballard/go-shellquote"
"io/ioutil"
"strings"
)
func IFFByName(name string) (*InputFileFormat, error) {
......
......@@ -29,10 +29,10 @@ type Ctx struct {
// An Item usually consists at least of a name, url and description
type Item struct {
Name string
Url string
Name string
Url string
RepoUrl string
Desc string
Desc string
}
// The output file format
......
......@@ -21,13 +21,13 @@ func parseSimpleBulletMarkdownLine(sep string) func(out io.Writer, l string, out
if starIndx != -1 && (l[0] == ' ' || l[0] == '*') && strings.HasPrefix(l[starIndx:], "* [") {
afterNameI := strings.IndexByte(l, ']')
outFF.Item(out,
&Item{
l[starIndx+3:afterNameI],
l[afterNameI+2:strings.IndexByte(l[afterNameI+2:], ')')+afterNameI+2],
"",
l[strings.Index(l, sep)+3:len(l)-1],
},
ctx)
&Item{
l[starIndx+3 : afterNameI],
l[afterNameI+2 : strings.IndexByte(l[afterNameI+2:], ')')+afterNameI+2],
"",
l[strings.Index(l, sep)+3 : len(l)-1],
},
ctx)
} else {
outFF.Literal(out, l, ctx)
}
......
......@@ -3,12 +3,12 @@ package awesomefw
import (
"context"
"crypto/tls"
"github.com/stretchr/testify/assert"
"net"
"net/http"
"net/http/httptest"
"strings"
"testing"
"github.com/stretchr/testify/assert"
)
type testDefaultClientHandler struct{}
......
......@@ -4,7 +4,6 @@ import (
"fmt"
"io"
"strings"
"net/url"
)
// Parses the code according to this pattern:
......
......@@ -137,6 +137,6 @@ func testTestOFF(t *testing.T, name string, off *OutputFileFormat, fail bool, in
Compile(strings.NewReader(in), len(in), ioutil.Discard, IFFTabSep(), off, &ApisCfg{&ApiCfg{}})
}
func TestNoopLiteral(t *testing.T) {
func TestNoopLiteral(t *testing.T) {
noopLiteral(nil, "", nil)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment