Showing 20 of 23 total issues
Function webhookService
has 8 return statements (exceeds 4 allowed). Open
Open
func webhookService(s *Server, spec *config.WebhookSpec, r *http.Request) (responseTemplare string, err error) {
ctx := r.Context()
if spec == nil {
return "", config.ErrSpecNotFound
Function Load
has 7 return statements (exceeds 4 allowed). Open
Open
func Load(cfgFile string) error {
var k = koanf.New(".")
// Load YAML config.
if err := k.Load(file.Provider(cfgFile), yaml.Parser()); err != nil {
Function loadTemplate
has 6 return statements (exceeds 4 allowed). Open
Open
func loadTemplate(spec, parentSpec *FormattingSpec, defaultTemplate string) (*FormattingSpec, error) {
if spec == nil {
spec = &FormattingSpec{}
}
Method storage.Push
has 6 return statements (exceeds 4 allowed). Open
Open
func (c storage) Push(ctx context.Context, value []byte) error {
// ! Deprecation notice: End of life in v1.0.0
if !c.config.UseFormattingToPerformQuery {
request := fmt.Sprintf("INSERT INTO %s(%s) VALUES ($1)", c.config.TableName, c.config.DataField)
if _, err := c.client.Query(request, value); err != nil {
Function NewStorage
has 5 return statements (exceeds 4 allowed). Open
Open
func NewStorage(configRaw map[string]interface{}) (*storage, error) {
var err error
newClient := storage{
config: &config{},
Method Formatter.Render
has 5 return statements (exceeds 4 allowed). Open
Open
func (d *Formatter) Render() (string, error) {
d.mu.RLock()
defer d.mu.RUnlock()
if d.tmplString == "" {
exported func NewStorage returns unexported type *postgres.storage, which can be annoying to use Open
Open
func NewStorage(configRaw map[string]interface{}) (*storage, error) {
- Exclude checks
exported func NewStorage returns unexported type *redis.storage, which can be annoying to use Open
Open
func NewStorage(configRaw map[string]interface{}) (*storage, error) {
- Exclude checks
func toJson should be toJSON Open
Open
func toJson(v interface{}) string {
- Exclude checks
func toPrettyJson should be toPrettyJSON Open
Open
func toPrettyJson(v interface{}) string {
- Exclude checks
a blank import should be only in a main or test package, or have a comment justifying it Open
Open
_ "github.com/lib/pq"
- Exclude checks
var uniquenessUrl should be uniquenessURL Open
Open
var uniquenessUrl = make(map[string]bool)
- Exclude checks
exported type ResponseSpec should have comment or be unexported Open
Open
type ResponseSpec struct {
- Exclude checks
Your code does not pass gofmt in 1 place. Go fmt your code! Open
Open
package server
- Exclude checks
exported type Server should have comment or be unexported Open
Open
type Server struct {
- Exclude checks
struct field HttpCode should be HTTPCode Open
Open
HttpCode int `mapstructure:"httpCode" json:"httpCode"`
- Exclude checks
func fromJson should be fromJSON Open
Open
func fromJson(v interface{}) map[string]interface{} {
- Exclude checks
exported func NewStorage returns unexported type *rabbitmq.storage, which can be annoying to use Open
Open
func NewStorage(configRaw map[string]interface{}) (*storage, error) {
- Exclude checks
exported type Formatter should have comment or be unexported Open
Open
type Formatter struct {
- Exclude checks
2: cannot find package "github.com/spf13/cobra" in any of: Open
Open
"github.com/spf13/cobra"
- Exclude checks