style: fix typo (#1592)

* style: fix typo

* style: add comment
This commit is contained in:
MaineK00n
2023-02-22 15:59:47 +09:00
committed by GitHub
parent 897fef24a3
commit 4e486dae1d
13 changed files with 16 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import (
// key: BlobPath
type DependencyGraphManifests map[string]DependencyGraphManifest
// DependencyGraphManifest has filename, repository, dependencies
type DependencyGraphManifest struct {
BlobPath string `json:"blobPath"`
Filename string `json:"filename"`
@@ -76,6 +77,7 @@ func (m DependencyGraphManifest) Ecosystem() string {
}
}
// Dependency has dependency package information
type Dependency struct {
PackageName string `json:"packageName"`
PackageManager string `json:"packageManager"`
@@ -83,6 +85,7 @@ type Dependency struct {
Requirements string `json:"requirements"`
}
// Version returns version
func (d Dependency) Version() string {
s := strings.Split(d.Requirements, " ")
if len(s) == 2 && s[0] == "=" {