def __init__(self, pkg='', rev='', address=None, payload=None, **kwargs):
    """
    :param str pkg: The package import path within the remote library; by default the root package
                    path (equivalent to passing `pkg='.'` or `pkg=''`).
    :param str rev: Identifies which version of the remote library to download. This could be a
                    commit SHA (git), node id (hg), etc.  If left unspecified the version will
                    default to the latest available.  It's highly recommended to not accept the
                    default and instead pin the rev explicitly for repeatable builds.
    """
    try:
      package_path = self.normalize_package_path(pkg)
    except __HOLE__ as e:
      raise TargetDefinitionException(address.spec, str(e))

    payload = payload or Payload()
    payload.add_fields({
      'rev': PrimitiveField(rev or ''),  # Guard against/allow `None`.
      'pkg': PrimitiveField(package_path),
    })

    super(GoRemoteLibrary, self).__init__(address=address, payload=payload, **kwargs)
dataset/ETHPy150Open pantsbuild/pants/contrib/go/src/python/pants/contrib/go/targets/go_remote_library.py/GoRemoteLibrary.__init__