<commit_before>require 'serverkit/resources/base'

module Serverkit
  module Resources
    class GoPackage < Base
      attribute :url, required: true, type: String

      # @note Override
      def apply
        run_command("go get -u #{url}")
      end

      # @note Override
      def check
        go_package_dir_path = "#{ENV['GOPATH']}/src/#{url}"
        check_command(
          backend.command.get(:check_file_is_directory, go_package_dir_path)
        )
      end
    end
  end
end
<commit_msg>Use `path` instead of `url`<commit_after>require 'serverkit/resources/base'

module Serverkit
  module Resources
    class GoPackage < Base
      attribute :path, required: true, type: String

      # @note Override
      def apply
        run_command("go get -u #{path}")
      end

      # @note Override
      def check
        go_package_path = "#{ENV['GOPATH']}/src/#{path}"
        check_command(
          backend.command.get(:check_file_is_directory, go_package_path)
        )
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.09813542688910697, 'fraction_numerical': 0.0, 'mean_word_length': 2.388704318936877, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5092096', 'n_tokens_mistral': 315, 'n_tokens_neox': 312, 'n_words': 78}