Sha256: 062da7b1bd3f3f749ff97f0ceb29e647dbd0ef9b1f892aa893470fb413168046
Contents?: true
Size: 684 Bytes
Versions: 21
Compression:
Stored size: 684 Bytes
Contents
# frozen_string_literal: true require 'license_finder/package' module LicenseFinder class GoPackage < Package def package_manager 'Go' end class << self def from_dependency(hash, prefix, full_version) name = hash['ImportPath'] install_path = hash['InstallPath'] install_path ||= install_path(prefix.join(name)) version = full_version ? hash['Rev'] : hash['Rev'][0..6] homepage = hash['Homepage'] new(name, version, install_path: install_path, package_manager: 'Go', homepage: homepage) end private def install_path(path) Pathname(path).cleanpath.to_s end end end end
Version data entries
21 entries across 21 versions & 1 rubygems