You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: govendor.rb
    path of file: ./repos/LicenseFinder/lib/license_finder/package_managers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'license_finder/shared_helpers/common_path'
require 'json'

module LicenseFinder
  class Govendor < PackageManager
    def possible_package_paths
      [project_path.join('vendor', 'vendor.json')]
    end

    def current_packages
      file = File.read(detected_package_path)
      packages = packages_from_json(file)
      packages.map do |package|
        GoPackage.from_dependen
    
    def packages_from_json(json_string)
      data = JSON.parse(json_string)
      packages = data['package']

      packages_by_sha = {}
      packages_with_no_sha = []

      packages.each do |package|
        package_path = package['origin'] || package['path']
        package_revision = package['revision']

        if !package_is_versioned?(package)
          packages_with_no_sha << { sha: '', path: package_path }
        elsif packages_by_sha[package_revision].nil?
          packages_by_sha[package_revision] = [package_path]
        else
          packages_by_sha[package_revision] << package_path
        end
      end