golang

module
v0.0.0-...-7dafc29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2021 License: MIT

README

golang

code base for helper in go language

How to Use

import "github.com/D074/golang/capture"

capture.InitCapture(&capture.Config{
		OutputPanic: capture.Slack,
		ShowTrace:   true,
		SlackClient: capture.SlackClient{
			WebHookUrl:  "your_web_hook_url",
			UserName:    "Your Sender Name",
			Channel:     "your own channel", 
			MentionUser: []string{}, //optional, ex: "KVGLBJASLN"
			MentionHere: true, //optional,
			Environment: "Your Environment", //optional, ex: prod, beta, stage
		},
	})

Use Go Mux

router := mux.NewRouter()
router.Use(capture.CapturePanic)

Use Http

http.Handle("/foo", capture.CapturePanic(fooHandler))

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL