Sha256: 81a2c7d5dbfb5b13391b151c1606c876a4af62e773305f3e1dd9bc9717a6e982
Contents?: true
Size: 619 Bytes
Versions: 14
Compression:
Stored size: 619 Bytes
Contents
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
14 entries across 14 versions & 1 rubygems