Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions assets/go-licenses.json

Large diffs are not rendered by default.

191 changes: 94 additions & 97 deletions go.mod

Large diffs are not rendered by default.

462 changes: 226 additions & 236 deletions go.sum

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions modules/indexer/internal/meilisearch/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

// Indexer represents a basic meilisearch indexer implementation
type Indexer struct {
Client *meilisearch.Client
Client meilisearch.ServiceManager

url, apiKey string
indexName string
Expand Down Expand Up @@ -40,11 +40,7 @@ func (i *Indexer) Init(_ context.Context) (bool, error) {
return false, fmt.Errorf("indexer is already initialized")
}

i.Client = meilisearch.NewClient(meilisearch.ClientConfig{
Host: i.url,
APIKey: i.apiKey,
})

i.Client = meilisearch.New(i.url, meilisearch.WithAPIKey(i.apiKey))
_, err := i.Client.GetIndex(i.VersionedIndexName())
if err == nil {
return true, nil
Expand Down
2 changes: 1 addition & 1 deletion modules/markup/markdown/transform_blockquote.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (g *ASTTransformer) extractBlockquoteAttentionEmphasis(firstParagraph ast.N
if !ok {
return "", nil
}
val1 := string(node1.Text(reader.Source()))
val1 := string(node1.Text(reader.Source())) //nolint:staticcheck
attentionType := strings.ToLower(val1)
if g.attentionTypes.Contains(attentionType) {
return attentionType, []ast.Node{node1}
Expand Down
2 changes: 1 addition & 1 deletion modules/markup/markdown/transform_codespan.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func cssColorHandler(value string) bool {
}

func (g *ASTTransformer) transformCodeSpan(_ *markup.RenderContext, v *ast.CodeSpan, reader text.Reader) {
colorContent := v.Text(reader.Source())
colorContent := v.Text(reader.Source()) //nolint:staticcheck
if cssColorHandler(string(colorContent)) {
v.AppendChild(v, NewColorPreview(colorContent))
}
Expand Down
2 changes: 1 addition & 1 deletion modules/markup/markdown/transform_heading.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (g *ASTTransformer) transformHeading(_ *markup.RenderContext, v *ast.Headin
v.SetAttribute(attr.Name, []byte(fmt.Sprintf("%v", attr.Value)))
}
}
txt := v.Text(reader.Source())
txt := v.Text(reader.Source()) //nolint:staticcheck
header := markup.Header{
Text: util.UnsafeBytesToString(txt),
Level: v.Level,
Expand Down
2 changes: 1 addition & 1 deletion modules/markup/mdstripper/mdstripper.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (r *stripRenderer) Render(w io.Writer, source []byte, doc ast.Node) error {
coalesce := prevSibIsText
r.processString(
w,
v.Text(source),
v.Text(source), //nolint:staticcheck
coalesce)
if v.SoftLineBreak() {
r.doubleSpace(w)
Expand Down
4 changes: 2 additions & 2 deletions services/auth/source/ldap/source_search.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ func dial(source *Source) (*ldap.Conn, error) {
}

if source.SecurityProtocol == SecurityProtocolLDAPS {
return ldap.DialTLS("tcp", net.JoinHostPort(source.Host, strconv.Itoa(source.Port)), tlsConfig)
return ldap.DialTLS("tcp", net.JoinHostPort(source.Host, strconv.Itoa(source.Port)), tlsConfig) //nolint:staticcheck
}

conn, err := ldap.Dial("tcp", net.JoinHostPort(source.Host, strconv.Itoa(source.Port)))
conn, err := ldap.Dial("tcp", net.JoinHostPort(source.Host, strconv.Itoa(source.Port))) //nolint:staticcheck
if err != nil {
return nil, fmt.Errorf("error during Dial: %w", err)
}
Expand Down
Loading