def _go_files(input_api, source_file_filter=None):
  """Collects affected go source files, but ignores ones generated by protoc."""
  files = []
  for f in input_api.AffectedTextFiles(source_file_filter):
    if not f.LocalPath().endswith('.go'):
      continue
    if f.LocalPath().endswith('.pb.go'):
      continue
    files.append(f)
  return files