func (sh *SlackrusHook) Fire(e *logrus.Entry) error {
	if sh.Disabled {
		return nil
	}
	color := ""
	switch e.Level {
	case logrus.DebugLevel:
		color = "#9B30FF"
	case logrus.InfoLevel:
		color = "good"
	case logrus.ErrorLevel, logrus.FatalLevel, logrus.PanicLevel:
		color = "danger"
	default:
		color = "warning"
	}
	msg := &slack.Message{
		Username:  sh.Username,
		Channel:   sh.Channel,
		IconEmoji: sh.IconEmoji,
		IconUrl:   sh.IconURL,
	}
	attach := msg.NewAttachment()
	newEntry := sh.newEntry(e)
	if len(newEntry.Data) > 0 {
		attach.Text = "Message fields"
		for k, v := range newEntry.Data {
			slackField := &slack.Field{}
			slackField.Title = k
			slackField.Value = fmt.Sprint(v)
			if len(slackField.Value) <= 20 {
				slackField.Short = true
			}
			attach.AddField(slackField)
		}
		attach.Pretext = newEntry.Message
	} else {
		attach.Text = newEntry.Message
	}
	attach.Fallback = newEntry.Message
	attach.Color = color
	if sh.SortFields {
		sort.SliceStable(attach.Fields, func(i, j int) bool {
			iTitle, jTitle := attach.Fields[i].Title, attach.Fields[j].Title
			if sh.SortPriorities == nil {
				return iTitle < jTitle
			}
			iVal, iOK := sh.SortPriorities[iTitle]
			jVal, jOK := sh.SortPriorities[jTitle]
			if iOK && !jOK {
				return true
			}
			if !iOK && jOK {
				return false
			}
			if (!iOK && !jOK) || iVal == jVal {
				return iTitle < jTitle
			}
			return iVal > jVal
		})
	}
	c := slack.NewClient(sh.HookURL)
	if sh.Asynchronous {
		go c.SendMessage(msg)
		return nil
	}
	return c.SendMessage(msg)
}
Fire -  Sent event to slack
package slackrus
import (
	"fmt"
	"sort"
	"github.com/johntdyer/slack-go"
	"github.com/sirupsen/logrus"
)
const (
	VERISON = "0.0.3"
)
type SlackrusHook struct {
	AcceptedLevels []logrus.Level
	HookURL        string
	IconURL        string
	Channel        string
	IconEmoji      string
	Username       string
	Asynchronous   bool
	Extra          map[string]interface{}
	Disabled       bool
	SortFields bool
	SortPriorities map[string]int
}
func (sh *SlackrusHook) Levels() []logrus.Level {
	if sh.AcceptedLevels == nil {
		return AllLevels
	}
	return sh.AcceptedLevels
}