fzxiao233/Vtb_Record

View on GitHub
live/monitor/base/monitorbase.go

Summary

Maintainability
A
0 mins
Test Coverage

exported type LiveInfo should have comment or be unexported
Open

type LiveInfo struct {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported method BaseMonitor.CheckLive should have comment or be unexported
Open

func (b *BaseMonitor) CheckLive(usersConfig config.UsersConfig) bool {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported function NoLiving should have comment or be unexported
Open

func NoLiving(Provide string, Name string) {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

struct field HttpHeaders should be HTTPHeaders
Open

    HttpHeaders map[string]string
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

method HttpGet should be HTTPGet
Open

func (c *MonitorCtx) HttpGet(url string, header map[string]string) ([]byte, error) {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

if block ends with a return statement, so drop this else and outdent its block
Open

    } else {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

method HttpPost should be HTTPPost
Open

func (c *MonitorCtx) HttpPost(url string, header map[string]string, data []byte) ([]byte, error) {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported method MonitorCtx.GetHeaders should have comment or be unexported
Open

func (c *MonitorCtx) GetHeaders() map[string]string {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

var proxyUrl should be proxyURL
Open

        proxyUrl, _ := url.Parse("socks5://" + proxy)
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported function GetCtx should have comment or be unexported
Open

func GetCtx(modName string) *MonitorCtx {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported type MonitorCtx should have comment or be unexported
Open

type MonitorCtx struct {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

type name will be used as base.BaseMonitor by other packages, and that stutters; consider calling this Monitor
Open

type BaseMonitor struct {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported method BaseMonitor.DownloadProvider should have comment or be unexported
Open

func (b *BaseMonitor) DownloadProvider() string {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported type BaseMonitor should have comment or be unexported
Open

type BaseMonitor struct {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported method MonitorCtx.HttpPost should have comment or be unexported
Open

func (c *MonitorCtx) HttpPost(url string, header map[string]string, data []byte) ([]byte, error) {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported method MonitorCtx.GetProxy should have comment or be unexported
Open

func (c *MonitorCtx) GetProxy() (string, bool) {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported method BaseMonitor.GetCtx should have comment or be unexported
Open

func (b *BaseMonitor) GetCtx() *MonitorCtx {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

comment on exported function GetMod should be of the form "GetMod ..."
Open

// get mod config & ctx statically
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported method BaseMonitor.CreateVideo should have comment or be unexported
Open

func (b *BaseMonitor) CreateVideo(usersConfig config.UsersConfig) *interfaces.VideoInfo {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

comment on exported function CreateMonitorCtx should be of the form "CreateMonitorCtx ..."
Open

// monitorCtx contains mod's extraConfig and its own http client
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported type HeadersConfig should have comment or be unexported
Open

type HeadersConfig struct {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

exported type VideoMonitor should have comment or be unexported
Open

type VideoMonitor interface {
Severity: Minor
Found in live/monitor/base/monitorbase.go by golint

There are no issues that match your filters.

Category
Status