Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
9d40a0af
Commit
9d40a0af
authored
Nov 18, 2015
by
Jeromy
Browse files
migrate to gx namespace
parent
fb31f446
Changes
231
Hide whitespace changes
Inline
Side-by-side
Too many changes to show.
To preserve performance only
231 of 231+
files are displayed.
Plain diff
Email patch
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/defaultconflict/nc.proto
deleted
100644 → 0
View file @
fb31f446
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax
=
"proto2"
;
package
defaultcheck
;
import
"github.com/gogo/protobuf/gogoproto/gogo.proto"
;
message
A
{
optional
int64
Field1
=
1
[
default
=
1234
,
(
gogoproto.nullable
)
=
false
];;
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/defaultconflict/nc_test.go
deleted
100644 → 0
View file @
fb31f446
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package
defaultcheck
import
(
"os"
"os/exec"
"strings"
"testing"
)
func
testDefaultConflict
(
t
*
testing
.
T
,
name
string
)
{
cmd
:=
exec
.
Command
(
"protoc"
,
"--gogo_out=."
,
"-I=../../../../../:../../protobuf/:."
,
name
+
".proto"
)
data
,
err
:=
cmd
.
CombinedOutput
()
if
err
==
nil
&&
!
strings
.
Contains
(
string
(
data
),
"Plugin failed with status code 1"
)
{
t
.
Errorf
(
"Expected error, got: %s"
,
data
)
if
err
:=
os
.
Remove
(
name
+
".pb.go"
);
err
!=
nil
{
t
.
Error
(
err
)
}
}
t
.
Logf
(
"received expected error = %v and output = %v"
,
err
,
string
(
data
))
}
func
TestNullableDefault
(
t
*
testing
.
T
)
{
testDefaultConflict
(
t
,
"nc"
)
}
func
TestNullableExtension
(
t
*
testing
.
T
)
{
testDefaultConflict
(
t
,
"nx"
)
}
func
TestNullableEnum
(
t
*
testing
.
T
)
{
testDefaultConflict
(
t
,
"ne"
)
}
func
TestFaceDefault
(
t
*
testing
.
T
)
{
testDefaultConflict
(
t
,
"df"
)
}
func
TestNoGettersDefault
(
t
*
testing
.
T
)
{
testDefaultConflict
(
t
,
"dg"
)
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/defaultconflict/ne.proto
deleted
100644 → 0
View file @
fb31f446
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax
=
"proto2"
;
package
defaultcheck
;
import
"github.com/gogo/protobuf/gogoproto/gogo.proto"
;
enum
E
{
P
=
10
;
Q
=
11
;
}
message
A
{
optional
E
Field1
=
1
[(
gogoproto.nullable
)
=
false
];
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/defaultconflict/nx.proto
deleted
100644 → 0
View file @
fb31f446
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax
=
"proto2"
;
package
defaultcheck
;
import
"github.com/gogo/protobuf/gogoproto/gogo.proto"
;
message
A
{
extensions
1
to
max
;
}
extend
A
{
optional
int64
Field1
=
1
[(
gogoproto.nullable
)
=
false
];
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/embedconflict/.gitignore
deleted
100644 → 0
View file @
fb31f446
*.pb.go
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/embedconflict/doc.go
deleted
100644 → 0
View file @
fb31f446
package
embedconflict
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/embedconflict/eb.proto
deleted
100644 → 0
View file @
fb31f446
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax
=
"proto2"
;
package
embedconflict
;
import
"github.com/gogo/protobuf/gogoproto/gogo.proto"
;
message
TakesLongTooDebug
{
optional
bytes
Field1
=
1
;
optional
bytes
Field2
=
2
[(
gogoproto.nullable
)
=
false
,
(
gogoproto.embed
)
=
true
];
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/embedconflict/ec.proto
deleted
100644 → 0
View file @
fb31f446
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package
embedconflict
;
import
"github.com/gogo/protobuf/gogoproto/gogo.proto"
;
message
A
{
optional
int64
Field1
=
1
;
optional
B
B
=
2
[(
gogoproto.embed
)
=
true
];
}
message
B
{
optional
double
Field1
=
1
;
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/embedconflict/ec_test.go
deleted
100644 → 0
View file @
fb31f446
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package
embedconflict
import
(
"os"
"os/exec"
"strings"
"testing"
)
func
TestEmbedConflict
(
t
*
testing
.
T
)
{
cmd
:=
exec
.
Command
(
"protoc"
,
"--gogo_out=."
,
"-I=../../../../../:../../protobuf/:."
,
"ec.proto"
)
data
,
err
:=
cmd
.
CombinedOutput
()
if
err
==
nil
&&
!
strings
.
Contains
(
string
(
data
),
"Plugin failed with status code 1"
)
{
t
.
Errorf
(
"Expected error, got: %s"
,
data
)
if
err
:=
os
.
Remove
(
"ec.pb.go"
);
err
!=
nil
{
t
.
Error
(
err
)
}
}
t
.
Logf
(
"received expected error = %v and output = %v"
,
err
,
string
(
data
))
}
func
TestEmbedMarshaler
(
t
*
testing
.
T
)
{
cmd
:=
exec
.
Command
(
"protoc"
,
"--gogo_out=."
,
"-I=../../../../../:../../protobuf/:."
,
"em.proto"
)
data
,
err
:=
cmd
.
CombinedOutput
()
dataStr
:=
string
(
data
)
t
.
Logf
(
"received error = %v and output = %v"
,
err
,
dataStr
)
if
!
strings
.
Contains
(
dataStr
,
"WARNING: found non-"
)
||
!
strings
.
Contains
(
dataStr
,
"unsafe_marshaler"
)
{
t
.
Errorf
(
"Expected WARNING: found non-[marshaler unsafe_marshaler] C with embedded marshaler D"
)
}
if
err
:=
os
.
Remove
(
"em.pb.go"
);
err
!=
nil
{
t
.
Error
(
err
)
}
}
func
TestEmbedExtend
(
t
*
testing
.
T
)
{
cmd
:=
exec
.
Command
(
"protoc"
,
"--gogo_out=."
,
"-I=../../../../../:../../protobuf/:."
,
"ee.proto"
)
data
,
err
:=
cmd
.
CombinedOutput
()
if
err
==
nil
&&
!
strings
.
Contains
(
string
(
data
),
"Plugin failed with status code 1"
)
{
t
.
Errorf
(
"Expected error, got: %s"
,
data
)
if
err
:=
os
.
Remove
(
"ee.pb.go"
);
err
!=
nil
{
t
.
Error
(
err
)
}
}
t
.
Logf
(
"received expected error = %v and output = %v"
,
err
,
string
(
data
))
}
func
TestCustomName
(
t
*
testing
.
T
)
{
cmd
:=
exec
.
Command
(
"protoc"
,
"--gogo_out=."
,
"-I=../../../../../:../../protobuf/:."
,
"en.proto"
)
data
,
err
:=
cmd
.
CombinedOutput
()
if
err
==
nil
&&
!
strings
.
Contains
(
string
(
data
),
"Plugin failed with status code 1"
)
{
t
.
Errorf
(
"Expected error, got: %s"
,
data
)
if
err
:=
os
.
Remove
(
"en.pb.go"
);
err
!=
nil
{
t
.
Error
(
err
)
}
}
t
.
Logf
(
"received expected error = %v and output = %v"
,
err
,
string
(
data
))
}
func
TestRepeatedEmbed
(
t
*
testing
.
T
)
{
cmd
:=
exec
.
Command
(
"protoc"
,
"--gogo_out=."
,
"-I=../../../../../:../../protobuf/:."
,
"er.proto"
)
data
,
err
:=
cmd
.
CombinedOutput
()
if
err
==
nil
&&
!
strings
.
Contains
(
string
(
data
),
"Plugin failed with status code 1"
)
{
t
.
Errorf
(
"Expected error, got: %s"
,
data
)
if
err
:=
os
.
Remove
(
"er.pb.go"
);
err
!=
nil
{
t
.
Error
(
err
)
}
}
dataStr
:=
string
(
data
)
t
.
Logf
(
"received error = %v and output = %v"
,
err
,
dataStr
)
warning
:=
"ERROR: found repeated embedded field B in message A"
if
!
strings
.
Contains
(
dataStr
,
warning
)
{
t
.
Errorf
(
"Expected "
+
warning
)
}
}
func
TestTakesTooLongToDebug
(
t
*
testing
.
T
)
{
cmd
:=
exec
.
Command
(
"protoc"
,
"--gogo_out=."
,
"-I=../../../../../:../../protobuf/:."
,
"eb.proto"
)
data
,
err
:=
cmd
.
CombinedOutput
()
if
err
==
nil
&&
!
strings
.
Contains
(
string
(
data
),
"Plugin failed with status code 1"
)
{
t
.
Errorf
(
"Expected error, got: %s"
,
data
)
if
err
:=
os
.
Remove
(
"eb.pb.go"
);
err
!=
nil
{
t
.
Error
(
err
)
}
}
dataStr
:=
string
(
data
)
t
.
Logf
(
"received error = %v and output = %v"
,
err
,
dataStr
)
warning
:=
"ERROR: found embedded bytes field"
if
!
strings
.
Contains
(
dataStr
,
warning
)
{
t
.
Errorf
(
"Expected "
+
warning
)
}
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/embedconflict/ee.proto
deleted
100644 → 0
View file @
fb31f446
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax
=
"proto2"
;
package
embedconflict
;
import
"github.com/gogo/protobuf/gogoproto/gogo.proto"
;
message
E
{
optional
int64
Field1
=
1
;
extensions
100
to
199
;
}
extend
E
{
optional
int64
Field1
=
100
[(
gogoproto.embed
)
=
true
];
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/embedconflict/em.proto
deleted
100644 → 0
View file @
fb31f446
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax
=
"proto2"
;
package
embedconflict
;
import
"github.com/gogo/protobuf/gogoproto/gogo.proto"
;
message
C
{
optional
int64
Field1
=
1
;
optional
D
D
=
2
[(
gogoproto.embed
)
=
true
];
}
message
D
{
option
(
gogoproto.marshaler
)
=
true
;
optional
double
Field2
=
2
;
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/embedconflict/en.proto
deleted
100644 → 0
View file @
fb31f446
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax
=
"proto2"
;
package
embedconflict
;
import
"github.com/gogo/protobuf/gogoproto/gogo.proto"
;
message
F
{
optional
G
G
=
2
[(
gogoproto.embed
)
=
true
,
(
gogoproto.customname
)
=
"G"
];
}
message
G
{
optional
int64
Field1
=
1
;
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/embedconflict/er.proto
deleted
100644 → 0
View file @
fb31f446
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax
=
"proto2"
;
package
embedconflict
;
import
"github.com/gogo/protobuf/gogoproto/gogo.proto"
;
message
A
{
optional
int64
Field1
=
1
;
repeated
B
B
=
2
[(
gogoproto.embed
)
=
true
];
}
message
B
{
optional
double
Field2
=
2
;
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/empty-issue70/Makefile
deleted
100644 → 0
View file @
fb31f446
# Extensions for Protocol Buffers to create more go like structures.
#
# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
# http://github.com/gogo/protobuf
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
regenerate
:
(
protoc
--proto_path
=
../../../../../:../../protobuf/:.
--gogo_out
=
.
empty.proto
)
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/empty-issue70/empty.pb.go
deleted
100644 → 0
View file @
fb31f446
// Code generated by protoc-gen-gogo.
// source: empty.proto
// DO NOT EDIT!
/*
Package empty is a generated protocol buffer package.
It is generated from these files:
empty.proto
It has these top-level messages:
TestRequest
*/
package
empty
import
proto
"QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto"
import
fmt
"fmt"
import
math
"math"
// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto"
import
io
"io"
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
_
=
fmt
.
Errorf
var
_
=
math
.
Inf
type
TestRequest
struct
{
XXX_unrecognized
[]
byte
`json:"-"`
}
func
(
m
*
TestRequest
)
Reset
()
{
*
m
=
TestRequest
{}
}
func
(
m
*
TestRequest
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
TestRequest
)
ProtoMessage
()
{}
func
(
m
*
TestRequest
)
Unmarshal
(
data
[]
byte
)
error
{
l
:=
len
(
data
)
iNdEx
:=
0
for
iNdEx
<
l
{
preIndex
:=
iNdEx
var
wire
uint64
for
shift
:=
uint
(
0
);
;
shift
+=
7
{
if
shift
>=
64
{
return
ErrIntOverflowEmpty
}
if
iNdEx
>=
l
{
return
io
.
ErrUnexpectedEOF
}
b
:=
data
[
iNdEx
]
iNdEx
++
wire
|=
(
uint64
(
b
)
&
0x7F
)
<<
shift
if
b
<
0x80
{
break
}
}
fieldNum
:=
int32
(
wire
>>
3
)
wireType
:=
int
(
wire
&
0x7
)
if
wireType
==
4
{
return
fmt
.
Errorf
(
"proto: TestRequest: wiretype end group for non-group"
)
}
if
fieldNum
<=
0
{
return
fmt
.
Errorf
(
"proto: TestRequest: illegal tag %d (wire type %d)"
,
fieldNum
,
wire
)
}
switch
fieldNum
{
default
:
iNdEx
=
preIndex
skippy
,
err
:=
skipEmpty
(
data
[
iNdEx
:
])
if
err
!=
nil
{
return
err
}
if
skippy
<
0
{
return
ErrInvalidLengthEmpty
}
if
(
iNdEx
+
skippy
)
>
l
{
return
io
.
ErrUnexpectedEOF
}
m
.
XXX_unrecognized
=
append
(
m
.
XXX_unrecognized
,
data
[
iNdEx
:
iNdEx
+
skippy
]
...
)
iNdEx
+=
skippy
}
}
if
iNdEx
>
l
{
return
io
.
ErrUnexpectedEOF
}
return
nil
}
func
skipEmpty
(
data
[]
byte
)
(
n
int
,
err
error
)
{
l
:=
len
(
data
)
iNdEx
:=
0
for
iNdEx
<
l
{
var
wire
uint64
for
shift
:=
uint
(
0
);
;
shift
+=
7
{
if
shift
>=
64
{
return
0
,
ErrIntOverflowEmpty
}
if
iNdEx
>=
l
{
return
0
,
io
.
ErrUnexpectedEOF
}
b
:=
data
[
iNdEx
]
iNdEx
++
wire
|=
(
uint64
(
b
)
&
0x7F
)
<<
shift
if
b
<
0x80
{
break
}
}
wireType
:=
int
(
wire
&
0x7
)
switch
wireType
{
case
0
:
for
shift
:=
uint
(
0
);
;
shift
+=
7
{
if
shift
>=
64
{
return
0
,
ErrIntOverflowEmpty
}
if
iNdEx
>=
l
{
return
0
,
io
.
ErrUnexpectedEOF
}
iNdEx
++
if
data
[
iNdEx
-
1
]
<
0x80
{
break
}
}
return
iNdEx
,
nil
case
1
:
iNdEx
+=
8
return
iNdEx
,
nil
case
2
:
var
length
int
for
shift
:=
uint
(
0
);
;
shift
+=
7
{
if
shift
>=
64
{
return
0
,
ErrIntOverflowEmpty
}
if
iNdEx
>=
l
{
return
0
,
io
.
ErrUnexpectedEOF
}
b
:=
data
[
iNdEx
]
iNdEx
++
length
|=
(
int
(
b
)
&
0x7F
)
<<
shift
if
b
<
0x80
{
break
}
}
iNdEx
+=
length
if
length
<
0
{
return
0
,
ErrInvalidLengthEmpty
}
return
iNdEx
,
nil
case
3
:
for
{
var
innerWire
uint64
var
start
int
=
iNdEx
for
shift
:=
uint
(
0
);
;
shift
+=
7
{
if
shift
>=
64
{
return
0
,
ErrIntOverflowEmpty
}
if
iNdEx
>=
l
{
return
0
,
io
.
ErrUnexpectedEOF
}
b
:=
data
[
iNdEx
]
iNdEx
++
innerWire
|=
(
uint64
(
b
)
&
0x7F
)
<<
shift
if
b
<
0x80
{
break
}
}
innerWireType
:=
int
(
innerWire
&
0x7
)
if
innerWireType
==
4
{
break
}
next
,
err
:=
skipEmpty
(
data
[
start
:
])
if
err
!=
nil
{
return
0
,
err
}
iNdEx
=
start
+
next
}
return
iNdEx
,
nil
case
4
:
return
iNdEx
,
nil
case
5
:
iNdEx
+=
4
return
iNdEx
,
nil
default
:
return
0
,
fmt
.
Errorf
(
"proto: illegal wireType %d"
,
wireType
)
}
}
panic
(
"unreachable"
)
}
var
(
ErrInvalidLengthEmpty
=
fmt
.
Errorf
(
"proto: negative length found during unmarshaling"
)
ErrIntOverflowEmpty
=
fmt
.
Errorf
(
"proto: integer overflow"
)
)
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/empty-issue70/empty.proto
deleted
100644 → 0
View file @
fb31f446
syntax
=
"proto2"
;
package
empty
;
import
"github.com/gogo/protobuf/gogoproto/gogo.proto"
;
option
(
gogoproto.unmarshaler_all
)
=
true
;
message
TestRequest
{
}
\ No newline at end of file
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/empty-issue70/empty_test.go
deleted
100644 → 0
View file @
fb31f446
package
empty
import
(
"testing"
)
func
TestEmpty
(
t
*
testing
.
T
)
{
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/enumprefix/Makefile
deleted
100644 → 0
View file @
fb31f446
# Extensions for Protocol Buffers to create more go like structures.
#
# Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
# http://github.com/gogo/protobuf
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
regenerate
:
(
protoc
--proto_path
=
../../../../../:../../protobuf/:.
--gogo_out
=
.
enumprefix.proto
)
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/enumprefix/enumprefix.pb.go
deleted
100644 → 0
View file @
fb31f446
// Code generated by protoc-gen-gogo.
// source: enumprefix.proto
// DO NOT EDIT!
/*
Package enumprefix is a generated protocol buffer package.
It is generated from these files:
enumprefix.proto
It has these top-level messages:
MyMessage
*/
package
enumprefix
import
proto
"QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/proto"
import
fmt
"fmt"
import
math
"math"
import
test
"QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test"
// discarding unused import gogoproto "github.com/gogo/protobuf/gogoproto"
// Reference imports to suppress errors if they are not otherwise used.
var
_
=
proto
.
Marshal
var
_
=
fmt
.
Errorf
var
_
=
math
.
Inf
type
MyMessage
struct
{
TheField
test
.
TheTestEnum
`protobuf:"varint,1,opt,name=TheField,enum=test.TheTestEnum" json:"TheField"`
XXX_unrecognized
[]
byte
`json:"-"`
}
func
(
m
*
MyMessage
)
Reset
()
{
*
m
=
MyMessage
{}
}
func
(
m
*
MyMessage
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
MyMessage
)
ProtoMessage
()
{}
func
(
m
*
MyMessage
)
GetTheField
()
test
.
TheTestEnum
{
if
m
!=
nil
{
return
m
.
TheField
}
return
test
.
A
}
vendor/QmfH4HuZyN1p2wQLWWkXC91Z76435xKrBVfLQ2MY8ayG5R/gogo-protobuf/test/enumprefix/enumprefix.proto
deleted
100644 → 0
View file @
fb31f446
// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.
// http://github.com/gogo/protobuf/gogoproto
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax
=
"proto2"
;
package
enumprefix
;
import
"github.com/gogo/protobuf/test/thetest.proto"
;
import
"github.com/gogo/protobuf/gogoproto/gogo.proto"
;
message
MyMessage
{
optional
test.TheTestEnum
TheField
=
1
[(
gogoproto.nullable
)
=
false
];
}
Prev
1
…
5
6
7
8
9
10
11
12
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment