Skip to content

Commit fccc9d5

Browse files
authored
Merge pull request #91 from edoardottt/devel
minor fixes and style-fix
2 parents 1e32eb7 + b694790 commit fccc9d5

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

.golangci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ linters:
4040
- common-false-positives
4141
- legacy
4242
- std-error-handling
43-
rules:
44-
- path: pkg/output/banner.go
45-
text: 'should be written without leading space as `//nolint: gochecknoglobals`'
4643
paths:
4744
- third_party$
4845
- builtin$

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ depsdev packages github.com/eslint/espree
157157

158158
### Go module
159159

160-
You can use *v3* or *v3alpha*.
160+
You can use *v3* or *v3alpha* API.
161161

162162
#### v3
163163

@@ -175,7 +175,7 @@ import (
175175

176176
func main() {
177177
client := depsdev.NewV3API()
178-
p, err := client.GetInfo("npm", "defangjs")
178+
p, err := client.GetPackage("npm", "defangjs")
179179
if err != nil {
180180
log.Fatal(err)
181181
}
@@ -201,7 +201,7 @@ import (
201201

202202
func main() {
203203
client := depsdev.NewV3AlphaAPI()
204-
p, err := client.GetInfo("npm", "defangjs")
204+
p, err := client.GetPackage("npm", "defangjs")
205205
if err != nil {
206206
log.Fatal(err)
207207
}

pkg/depsdev/v3alpha/api.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ func (a *APIv3Alpha) GetProjectPackageVersions(projectName string) (def.PackageV
194194

195195
// GetDependents returns information about the number of distinct packages known to depend
196196
// on the given package version. Dependent counts are currently available for npm, Cargo, Maven and PyPI.
197-
//
198197
// Dependent counts are derived from the dependency graphs computed by deps.dev, which means that only public dependents are counted.
199198
// As such, dependent counts should be treated as indicative of relative popularity rather than precisely accurate.
200199
func (a *APIv3Alpha) GetDependents(packageManager, packageName, version string) (def.Dependent, error) {
@@ -212,7 +211,7 @@ func (a *APIv3Alpha) GetDependents(packageManager, packageName, version string)
212211
return response, nil
213212
}
214213

215-
// GetCapabilityRequest returns counts for direct and indirect calls to Capslock capabilities for a given package version.
214+
// GetCapabilities returns counts for direct and indirect calls to Capslock capabilities for a given package version.
216215
// Currently only available for Go.
217216
func (a *APIv3Alpha) GetCapabilities(packageManager, packageName, version string) (def.Capabilities, error) {
218217
if !input.IsValidPackageManager(packageManager, input.AllValidPackageManagers) {

pkg/depsdev/v3alpha/api_internal_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var (
2828
api = NewV3AlphaAPI()
2929
)
3030

31-
func BenchmarkGetInfo(b *testing.B) {
31+
func BenchmarkGetPackage(b *testing.B) {
3232
b.Run("function", func(b *testing.B) {
3333
var (
3434
info def.Package

0 commit comments

Comments
 (0)