Method: Licensed::Sources::Go#non_vendored_import_path
- Defined in:
- lib/licensed/sources/go.rb
#non_vendored_import_path(package) ⇒ Object
Returns the non-vendored portion of the package import path if vendored, otherwise returns the package’s import path as given
package - Package to get the non-vendored import path for
168 169 170 171 172 173 174 175 |
# File 'lib/licensed/sources/go.rb', line 168 def non_vendored_import_path(package) return if package.nil? parts = vendored_path_parts(package) return parts[:import_path] if parts # if a package isn't vendored, return the packages "ImportPath" package["ImportPath"] end |