chore: switch to go modules

This commit is contained in:
Manfred Touron
2018-09-13 01:54:44 +02:00
parent c015ff9539
commit 8b191e85f2
206 changed files with 127 additions and 50492 deletions

View File

@@ -1,27 +0,0 @@
Want to contribute? Great! First, read this page (including the small print at the end).
### Before you contribute
Before we can use your code, you must sign the
[Google Individual Contributor License Agreement]
(https://cla.developers.google.com/about/google-individual)
(CLA), which you can do online. The CLA is necessary mainly because you own the
copyright to your changes, even after your contribution becomes part of our
codebase, so we need your permission to use and distribute your code. We also
need to be sure of various other things—for instance that you'll tell us if you
know that your code infringes on other people's patents. You don't have to sign
the CLA until after you've submitted your code for review and a member has
approved it, but you must do it before we can put your code into our codebase.
Before you start working on a larger contribution, you should get in touch with
us first through the issue tracker with your idea so that we can help out and
possibly guide you. Coordinating up front makes it much easier to avoid
frustration later on.
### Code reviews
All submissions, including submissions by project members, require review. We
use Github pull requests for this purpose.
### The small print
Contributions made by corporations are covered by a different agreement than
the one above, the
[Software Grant and Corporate Contributor License Agreement]
(https://cla.developers.google.com/about/google-corporate).

View File

@@ -1,28 +0,0 @@
Go generated proto packages
===========================
[![Build Status](https://travis-ci.org/google/go-genproto.svg?branch=master)](https://travis-ci.org/google/go-genproto)
[![GoDoc](https://godoc.org/google.golang.org/genproto?status.svg)](https://godoc.org/google.golang.org/genproto)
> **IMPORTANT** This repository is currently experimental. The structure
> of the contained packages is subject to change. Please see the original
> source repositories (listed below) to find out the status of the each
> protocol buffer's associated service.
This repository contains the generated Go packages for common protocol buffer
types, and the generated [gRPC][1] code necessary for interacting with Google's gRPC
APIs.
There are two sources for the proto files used in this repository:
1. [google/protobuf][2]: the code in the `protobuf` and `ptypes` subdirectories
is derived from this repo. The messages in `protobuf` are used to describe
protocol buffer messages themselves. The messages under `ptypes` define the
common well-known types.
2. [googleapis/googleapis][3]: the code in the `googleapis` is derived from this
repo. The packages here contain types specifically for interacting with Google
APIs.
[1]: http://grpc.io
[2]: https://github.com/google/protobuf/
[3]: https://github.com/googleapis/googleapis/

View File

@@ -1,78 +0,0 @@
#!/bin/bash
#
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This script rebuilds the generated code for the protocol buffers.
# To run this you will need protoc and goprotobuf installed;
# see https://github.com/golang/protobuf for instructions.
# You also need Go and Git installed.
set -e
PKG=google.golang.org/genproto
PROTO_REPO=https://github.com/google/protobuf
PROTO_SUBDIR=src/google/protobuf
API_REPO=https://github.com/googleapis/googleapis
function die() {
echo 1>&2 $*
exit 1
}
# Sanity check that the right tools are accessible.
for tool in go git protoc protoc-gen-go; do
q=$(which $tool) || die "didn't find $tool"
echo 1>&2 "$tool: $q"
done
root=$(go list -f '{{.Root}}' $PKG/... | head -n1)
if [ -z "$root" ]; then
die "cannot find root of $PKG"
fi
remove_dirs=
trap 'rm -rf $remove_dirs' EXIT
if [ -z "$PROTOBUF" ]; then
proto_repo_dir=$(mktemp -d -t regen-cds-proto.XXXXXX)
git clone -q $PROTO_REPO $proto_repo_dir &
remove_dirs="$proto_repo_dir"
# The protoc include directory is actually the "src" directory of the repo.
protodir="$proto_repo_dir/src"
else
protodir="$PROTOBUF"
fi
if [ -z "$GOOGLEAPIS" ]; then
apidir=$(mktemp -d -t regen-cds-api.XXXXXX)
git clone -q $API_REPO $apidir &
remove_dirs="$remove_dirs $apidir"
else
apidir="$GOOGLEAPIS"
fi
wait
# Nuke everything, we'll generate them back
rm -r googleapis/ protobuf/
go run regen.go -go_out "$root/src" -pkg_prefix "$PKG" "$apidir" "$protodir"
# Sanity check the build.
echo 1>&2 "Checking that the libraries build..."
go build -v ./...
echo 1>&2 "All done!"