Skip to content

Commit

Permalink
chore: migrate from 'tron-us' to 'bittorrent'
Browse files Browse the repository at this point in the history
  • Loading branch information
imstevez committed May 31, 2023
1 parent 3b725f9 commit 332147e
Show file tree
Hide file tree
Showing 578 changed files with 30,745 additions and 30,713 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ contributors:
js:
ifeq (go1.12, $(findstring go1.12, $(GO_VERSION)))
go get -u github.com/gopherjs/gopherjs
gopherjs build github.com/tron-us/protobuf/protoc-gen-gogo
gopherjs build github.com/bittorrent/protobuf/protoc-gen-gogo
endif

purego:
Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ each source `.proto` file is associated with a single Go package. The
name and import path for this package is specified with the `go_package`
proto option:

option go_package = "github.com/tron-us/protobuf/types";
option go_package = "github.com/bittorrent/protobuf/types";

The protocol buffer compiler will attempt to derive a package name and
import path if a `go_package` option is not present, but it is
Expand Down Expand Up @@ -195,7 +195,7 @@ To create and play with a Test object from the example package,
import (
"log"

"github.com/tron-us/protobuf/proto"
"github.com/bittorrent/protobuf/proto"
"path/to/example"
)

Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Install protoc-gen-gogo:

go get github.com/gogo/protobuf/proto
go get github.com/gogo/protobuf/jsonpb
go get github.com/tron-us/protobuf/protoc-gen-gogo
go get github.com/bittorrent/protobuf/protoc-gen-gogo
go get github.com/gogo/protobuf/gogoproto

## GRPC
Expand Down
2 changes: 1 addition & 1 deletion codec/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
package codec

import (
"github.com/tron-us/protobuf/proto"
"github.com/bittorrent/protobuf/proto"
)

type Codec interface {
Expand Down
2 changes: 1 addition & 1 deletion codec/codec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
package codec

import (
"github.com/tron-us/protobuf/test"
"github.com/bittorrent/protobuf/test"
"math/rand"
"testing"
"time"
Expand Down
6 changes: 3 additions & 3 deletions conformance/conformance.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ import (
"io"
"os"

pb "github.com/tron-us/protobuf/conformance/internal/conformance_proto"
"github.com/tron-us/protobuf/jsonpb"
"github.com/tron-us/protobuf/proto"
pb "github.com/bittorrent/protobuf/conformance/internal/conformance_proto"
"github.com/bittorrent/protobuf/jsonpb"
"github.com/bittorrent/protobuf/proto"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion conformance/internal/conformance_proto/conformance.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/tron-us/protobuf
module github.com/bittorrent/protobuf

go 1.13

Expand Down
4 changes: 2 additions & 2 deletions gogoproto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

regenerate:
go install github.com/tron-us/protobuf/protoc-gen-gogo
protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/tron-us/protobuf/protoc-gen-gogo/descriptor:../../../../ --proto_path=../../../../:../protobuf/:. *.proto
go install github.com/bittorrent/protobuf/protoc-gen-gogo
protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/bittorrent/protobuf/protoc-gen-gogo/descriptor:../../../../ --proto_path=../../../../:../protobuf/:. *.proto
protoc --js_out=import_style=commonjs,binary:. --proto_path=. *.proto

restore:
Expand Down
6 changes: 3 additions & 3 deletions gogoproto/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ The following message:
package test;
import "github.com/tron-us/protobuf/gogoproto/gogo.proto";
import "github.com/bittorrent/protobuf/gogoproto/gogo.proto";
message A {
optional string Description = 1 [(gogoproto.nullable) = false];
optional int64 Number = 2 [(gogoproto.nullable) = false];
optional bytes Id = 3 [(gogoproto.customtype) = "github.com/tron-us/protobuf/test/custom.Uuid", (gogoproto.nullable) = false];
optional bytes Id = 3 [(gogoproto.customtype) = "github.com/bittorrent/protobuf/test/custom.Uuid", (gogoproto.nullable) = false];
}
Will generate a go struct which looks a lot like this:
Expand All @@ -86,7 +86,7 @@ Next we will embed the message A in message B.
message B {
optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true];
repeated bytes G = 2 [(gogoproto.customtype) = "github.com/tron-us/protobuf/test/custom.Uint128", (gogoproto.nullable) = false];
repeated bytes G = 2 [(gogoproto.customtype) = "github.com/bittorrent/protobuf/test/custom.Uint128", (gogoproto.nullable) = false];
}
See below that A is embedded in B.
Expand Down
178 changes: 89 additions & 89 deletions gogoproto/gogo.pb.go

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions gogoproto/gogo.pb.golden
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

package gogoproto

import proto "github.com/tron-us/protobuf/proto"
import proto "github.com/bittorrent/protobuf/proto"
import json "encoding/json"
import math "math"
import google_protobuf "github.com/tron-us/protobuf/protoc-gen-gogo/descriptor"
import google_protobuf "github.com/bittorrent/protobuf/protoc-gen-gogo/descriptor"

// Reference proto, json, and math imports to suppress error if they are not otherwise used.
var _ = proto.Marshal
Expand Down
2 changes: 1 addition & 1 deletion gogoproto/gogo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import "google/protobuf/descriptor.proto";

option java_package = "com.google.protobuf";
option java_outer_classname = "GoGoProtos";
option go_package = "github.com/tron-us/protobuf/gogoproto";
option go_package = "github.com/bittorrent/protobuf/gogoproto";

extend google.protobuf.EnumOptions {
optional bool goproto_enum_prefix = 62001;
Expand Down
11 changes: 10 additions & 1 deletion gogoproto/gogo_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck

var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var global =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();

var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
goog.object.extend(proto, google_protobuf_descriptor_pb);
Expand Down
4 changes: 2 additions & 2 deletions gogoproto/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

package gogoproto

import google_protobuf "github.com/tron-us/protobuf/protoc-gen-gogo/descriptor"
import proto "github.com/tron-us/protobuf/proto"
import google_protobuf "github.com/bittorrent/protobuf/protoc-gen-gogo/descriptor"
import proto "github.com/bittorrent/protobuf/proto"

func IsEmbed(field *google_protobuf.FieldDescriptorProto) bool {
return proto.GetBoolExtension(field.Options, E_Embed, false)
Expand Down
2 changes: 1 addition & 1 deletion io/full.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
package io

import (
"github.com/tron-us/protobuf/proto"
"github.com/bittorrent/protobuf/proto"
"io"
)

Expand Down
2 changes: 1 addition & 1 deletion io/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
package io

import (
"github.com/tron-us/protobuf/proto"
"github.com/bittorrent/protobuf/proto"
"io"
)

Expand Down
4 changes: 2 additions & 2 deletions io/io_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ package io_test
import (
"bytes"
"encoding/binary"
"github.com/tron-us/protobuf/io"
"github.com/tron-us/protobuf/test"
"github.com/bittorrent/protobuf/io"
"github.com/bittorrent/protobuf/test"
goio "io"
"math/rand"
"testing"
Expand Down
2 changes: 1 addition & 1 deletion io/uint32.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"encoding/binary"
"io"

"github.com/tron-us/protobuf/proto"
"github.com/bittorrent/protobuf/proto"
)

const uint32BinaryLen = 4
Expand Down
6 changes: 3 additions & 3 deletions io/uint32_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"testing"
"time"

"github.com/tron-us/protobuf/test"
example "github.com/tron-us/protobuf/test/example"
"github.com/bittorrent/protobuf/test"
example "github.com/bittorrent/protobuf/test/example"

"github.com/tron-us/protobuf/io"
"github.com/bittorrent/protobuf/io"
)

func BenchmarkUint32DelimWriterMarshaller(b *testing.B) {
Expand Down
2 changes: 1 addition & 1 deletion io/varint.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (
"bufio"
"encoding/binary"
"errors"
"github.com/tron-us/protobuf/proto"
"github.com/bittorrent/protobuf/proto"
"io"
)

Expand Down
4 changes: 2 additions & 2 deletions jsonpb/jsonpb.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ import (
"strings"
"time"

"github.com/tron-us/protobuf/proto"
"github.com/tron-us/protobuf/types"
"github.com/bittorrent/protobuf/proto"
"github.com/bittorrent/protobuf/types"
)

const secondInNanos = int64(time.Second / time.Nanosecond)
Expand Down
8 changes: 4 additions & 4 deletions jsonpb/jsonpb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ import (
"strings"
"testing"

pb "github.com/tron-us/protobuf/jsonpb/jsonpb_test_proto"
"github.com/tron-us/protobuf/proto"
proto3pb "github.com/tron-us/protobuf/proto/proto3_proto"
"github.com/tron-us/protobuf/types"
pb "github.com/bittorrent/protobuf/jsonpb/jsonpb_test_proto"
"github.com/bittorrent/protobuf/proto"
proto3pb "github.com/bittorrent/protobuf/proto/proto3_proto"
"github.com/bittorrent/protobuf/types"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion jsonpb/jsonpb_test_proto/more_test_objects.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jsonpb/jsonpb_test_proto/test_objects.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions plugin/compare/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
package compare

import (
"github.com/tron-us/protobuf/gogoproto"
"github.com/tron-us/protobuf/proto"
descriptor "github.com/tron-us/protobuf/protoc-gen-gogo/descriptor"
"github.com/tron-us/protobuf/protoc-gen-gogo/generator"
"github.com/tron-us/protobuf/vanity"
"github.com/bittorrent/protobuf/gogoproto"
"github.com/bittorrent/protobuf/proto"
descriptor "github.com/bittorrent/protobuf/protoc-gen-gogo/descriptor"
"github.com/bittorrent/protobuf/protoc-gen-gogo/generator"
"github.com/bittorrent/protobuf/vanity"
)

type plugin struct {
Expand Down Expand Up @@ -61,8 +61,8 @@ func (p *plugin) Generate(file *generator.FileDescriptor) {
p.PluginImports = generator.NewPluginImports(p.Generator)
p.fmtPkg = p.NewImport("fmt")
p.bytesPkg = p.NewImport("bytes")
p.sortkeysPkg = p.NewImport("github.com/tron-us/protobuf/sortkeys")
p.protoPkg = p.NewImport("github.com/tron-us/protobuf/proto")
p.sortkeysPkg = p.NewImport("github.com/bittorrent/protobuf/sortkeys")
p.protoPkg = p.NewImport("github.com/bittorrent/protobuf/proto")

for _, msg := range file.Messages() {
if msg.DescriptorProto.GetOptions().GetMapEntry() {
Expand Down
8 changes: 4 additions & 4 deletions plugin/compare/comparetest.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
package compare

import (
"github.com/tron-us/protobuf/gogoproto"
"github.com/tron-us/protobuf/plugin/testgen"
"github.com/tron-us/protobuf/protoc-gen-gogo/generator"
"github.com/bittorrent/protobuf/gogoproto"
"github.com/bittorrent/protobuf/plugin/testgen"
"github.com/bittorrent/protobuf/protoc-gen-gogo/generator"
)

type test struct {
Expand All @@ -47,7 +47,7 @@ func (p *test) Generate(imports generator.PluginImports, file *generator.FileDes
randPkg := imports.NewImport("math/rand")
timePkg := imports.NewImport("time")
testingPkg := imports.NewImport("testing")
protoPkg := imports.NewImport("github.com/tron-us/protobuf/proto")
protoPkg := imports.NewImport("github.com/bittorrent/protobuf/proto")
unsafePkg := imports.NewImport("unsafe")
if !gogoproto.ImportsGoGoProto(file.FileDescriptorProto) {
protoPkg = imports.NewImport("github.com/golang/protobuf/proto")
Expand Down
4 changes: 2 additions & 2 deletions plugin/defaultcheck/defaultcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ package defaultcheck

import (
"fmt"
"github.com/tron-us/protobuf/gogoproto"
"github.com/tron-us/protobuf/protoc-gen-gogo/generator"
"github.com/bittorrent/protobuf/gogoproto"
"github.com/bittorrent/protobuf/protoc-gen-gogo/generator"
"os"
)

Expand Down
14 changes: 7 additions & 7 deletions plugin/description/description.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The following message:
message B {
option (gogoproto.description) = true;
optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true];
repeated bytes G = 2 [(gogoproto.customtype) = "github.com/tron-us/protobuf/test/custom.Uint128", (gogoproto.nullable) = false];
repeated bytes G = 2 [(gogoproto.customtype) = "github.com/bittorrent/protobuf/test/custom.Uint128", (gogoproto.nullable) = false];
}
given to the description plugin, will generate the following code:
Expand All @@ -79,10 +79,10 @@ import (
"bytes"
"compress/gzip"
"fmt"
"github.com/tron-us/protobuf/gogoproto"
"github.com/tron-us/protobuf/proto"
descriptor "github.com/tron-us/protobuf/protoc-gen-gogo/descriptor"
"github.com/tron-us/protobuf/protoc-gen-gogo/generator"
"github.com/bittorrent/protobuf/gogoproto"
"github.com/bittorrent/protobuf/proto"
descriptor "github.com/bittorrent/protobuf/protoc-gen-gogo/descriptor"
"github.com/bittorrent/protobuf/protoc-gen-gogo/generator"
)

type plugin struct {
Expand All @@ -107,8 +107,8 @@ func (p *plugin) Generate(file *generator.FileDescriptor) {
localName := generator.FileName(file)

p.PluginImports = generator.NewPluginImports(p.Generator)
descriptorPkg := p.NewImport("github.com/tron-us/protobuf/protoc-gen-gogo/descriptor")
protoPkg := p.NewImport("github.com/tron-us/protobuf/proto")
descriptorPkg := p.NewImport("github.com/bittorrent/protobuf/protoc-gen-gogo/descriptor")
protoPkg := p.NewImport("github.com/bittorrent/protobuf/proto")
gzipPkg := p.NewImport("compress/gzip")
bytesPkg := p.NewImport("bytes")
ioutilPkg := p.NewImport("io/ioutil")
Expand Down
6 changes: 3 additions & 3 deletions plugin/description/descriptiontest.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
package description

import (
"github.com/tron-us/protobuf/gogoproto"
"github.com/tron-us/protobuf/plugin/testgen"
"github.com/tron-us/protobuf/protoc-gen-gogo/generator"
"github.com/bittorrent/protobuf/gogoproto"
"github.com/bittorrent/protobuf/plugin/testgen"
"github.com/bittorrent/protobuf/protoc-gen-gogo/generator"
)

type test struct {
Expand Down
Loading

0 comments on commit 332147e

Please sign in to comment.