Skip to content

Commit

Permalink
feat(go) : use pkg.go.dev instead of godoc.org
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu MOREL <mmorel-35@users.noreply.github.com>
  • Loading branch information
mmorel-35 committed Aug 31, 2021
1 parent 1ac9593 commit 73cfbbe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/licensed/sources/dep.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ def packages
end
end

# Returns the godoc.org page for a package.
# Returns the pkg.go.dev page for a package.
def homepage(import_path)
return unless import_path
"https://godoc.org/#{import_path}"
"https://pkg.go.dev/#{import_path}"
end

# Returns whether the package is part of the go std list. Replaces
Expand Down
4 changes: 2 additions & 2 deletions lib/licensed/sources/go.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ def contents_version_arguments
end
end

# Returns the godoc.org page for a package.
# Returns the pkg.go.dev page for a package.
def homepage(import_path)
return unless import_path
"https://godoc.org/#{import_path}"
"https://pkg.go.dev/#{import_path}"
end

# Returns the root directory to search for a package license
Expand Down
2 changes: 1 addition & 1 deletion test/sources/dep_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
dep = source.dependencies.detect { |d| d.name == "github.com/gorilla/context" }
assert dep
assert_equal "dep", dep.record["type"]
assert_equal "https://godoc.org/github.com/gorilla/context", dep.record["homepage"]
assert_equal "https://pkg.go.dev/github.com/gorilla/context", dep.record["homepage"]
end
end

Expand Down

0 comments on commit 73cfbbe

Please sign in to comment.