checkdeps

package module
v0.0.0-...-1505317 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MIT Imports: 5 Imported by: 0

README

checkdeps Go Documentation Go Report Card codecov

checkdeps is check pkg dependencies

examples

The error is caught because the usecase should not depend on the controller.

dependencies rule

controller -> usecase -> domain/repository(interface),domain/model <- repository(struct)

go file

package usecase

import (
	"a4/domain/model"
	"a4/repository" // want "error: found bug in dependency import"
)

type A struct {
	repo repository.A
}

var _ *model.A = (*model.A)(nil)

install

go install github.com/mahiro72/checkdeps/cmd/checkdeps@latest

Useage

go vet -vettool=`which checkdeps` pkgname

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "checkdeps",
	Doc:  doc,
	Run:  r.run,
}

Analyzer is ...

Functions

This section is empty.

Types

type Run

type Run struct {
	// contains filtered or unexported fields
}

Directories

Path Synopsis
cmd
pkg
yml

Jump to

Keyboard shortcuts

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