Skip to content

Commit

Permalink
Merge pull request #46 from xushiwei/class
Browse files Browse the repository at this point in the history
gopmod: IsPkgtStandard
  • Loading branch information
xushiwei authored Jan 22, 2024
2 parents 5044606 + 5c13744 commit 7db361b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gopmod/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ const (
PkgtInvalid = -1 // an invalid package
)

// IsPkgtStandard checks if a pkgPath is Go standard package or not.
func (p *Module) IsPkgtStandard(pkgPath string) bool {
return p.PkgType(pkgPath) == PkgtStandard
}

// PkgType returns the package type of specified package.
func (p *Module) PkgType(pkgPath string) PkgType {
if pkgPath == "" {
Expand Down

0 comments on commit 7db361b

Please sign in to comment.