Skip to content

Commit

Permalink
ci(sourcelevel): exclude the changelog
Browse files Browse the repository at this point in the history
It's very noisy and not managed by me
  • Loading branch information
SpokeyWheeler committed Jan 16, 2021
1 parent 914094d commit d20dcc5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 12 deletions.
24 changes: 24 additions & 0 deletions .sourcelevel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This configuration was used SourceLevel to review the SpokeyWheeler/batcher repository
# on 914094d864c21e659302ccd9bfa172ec35961e7d.
# You can make this the default configuration for future reviews by moving this
# file to your repository as `.sourcelevel.yml` and pushing it to GitHub, and tweak
# it as you wish - To know more on how to change this file to better review your
# repository you can go to https://docs.sourcelevel.io/configuration and see the configuration
# details.
---
styleguide: sourcelevel/linters
engines:
fixme:
enabled: true
gofmt:
enabled: true
govet:
enabled: true
golint:
enabled: true
remark-lint:
enabled: true
exclude_paths:
- test
- CHANGELOG.md

24 changes: 12 additions & 12 deletions batcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"database/sql"
"flag"
"fmt"
_ "github.com/lib/pq"
_ "github.com/go-sql-driver/mysql"
_ "github.com/lib/pq"
"log"
"os"
"strings"
Expand Down Expand Up @@ -40,16 +40,16 @@ var (
)

func getStringInBetween(str string, start string, end string) (result string) {
s := strings.Index(str, start)
if s == -1 {
return
}
s += len(start)
e := strings.Index(str, end)
if e == -1 {
return
}
return str[s:e]
s := strings.Index(str, start)
if s == -1 {
return
}
s += len(start)
e := strings.Index(str, end)
if e == -1 {
return
}
return str[s:e]
}

func parseArgs() *jobConfig {
Expand Down Expand Up @@ -98,7 +98,7 @@ func parseArgs() *jobConfig {
if jc.user == "" {
if strings.Contains(jc.opts, "sslcert") {
if strings.Contains(jc.opts, "&") {
optslice:=strings.Split(jc.opts, "&")
optslice := strings.Split(jc.opts, "&")
for _, value := range optslice {
if strings.Contains(value, "sslcert") {
tmpuser = getStringInBetween(value, "client.", ".crt")
Expand Down

0 comments on commit d20dcc5

Please sign in to comment.