old_contents: from coalib.bearlib.abstractions.Lint import Lint
  from coalib.bears.LocalBear import LocalBear
  
  
  class GoImportsBear(Lint, LocalBear):
      executable = 'goimports'
      diff_message = "Imports need to be added/removed."
      use_stdin = True
      gives_corrected = True
      LANGUAGES = "Go"
  
      def run(self, filename, file):
          """
          Adds/Removes imports to Go code for missing imports.
          """
          return self.lint(filename, file)
  
new_contents: from coalib.bearlib.abstractions.Linter import linter
  
  
  @linter(executable='goimports',
          use_stdin=True,
          output_format='corrected',
          diff_message='Imports need to be added/removed.')
  class GoImportsBear:
      """
      Adds/Removes imports to Go code for missing imports.
      """
      LANGUAGES = "Go"
  
      @staticmethod
      def create_arguments(filename, file, config_file):
          return ()
  
subject: Refactor to Linter v2 API