Rewrite simple test (only grpc output)
This commit is contained in:
parent
304fba375b
commit
536162a58b
@ -1,9 +1,11 @@
|
|||||||
{
|
{
|
||||||
"build-date": "2016-12-15T11:05:13.620228009+01:00",
|
"build-date": "2016-12-20T11:30:36.474403064+01:00",
|
||||||
"build-hostname": "moul-rose.local",
|
"build-hostname": "Zoon-MacBook.local",
|
||||||
"build-user": "moul",
|
"build-user": "zoon",
|
||||||
"pwd": "/Users/moul/Git/moul/protoc-gen-gotemplate/examples/dummy",
|
"go-pwd": "github.com/protoc-gen-gotemplate/examples/dummy",
|
||||||
|
"pwd": "/Users/zoon/Projects/gopath/src/github.com/protoc-gen-gotemplate/examples/dummy",
|
||||||
"debug": false,
|
"debug": false,
|
||||||
|
"destination-dir": ".",
|
||||||
"file": {
|
"file": {
|
||||||
"name": "dummy.proto",
|
"name": "dummy.proto",
|
||||||
"package": "dummy",
|
"package": "dummy",
|
||||||
@ -840,11 +842,40 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"environment": [
|
"environment": [
|
||||||
|
"TERM_PROGRAM=iTerm.app",
|
||||||
|
"ANDROID_HOME=/usr/local/opt/android-sdk",
|
||||||
"TERM=xterm-256color",
|
"TERM=xterm-256color",
|
||||||
"SHELL=/bin/zsh",
|
"SHELL=/bin/zsh",
|
||||||
"TMPDIR=/var/folders/wr/dddkjx017kv8qk4q_jd2ly080000gn/T/",
|
"MAKEFLAGS=",
|
||||||
"PWD=/Users/moul/Git/moul/protoc-gen-gotemplate/examples/dummy",
|
"TMPDIR=/var/folders/sq/wlptrlpn4v52xv7xpsgw0fc80000gn/T/",
|
||||||
|
"Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.q9vxeee00S/Render",
|
||||||
|
"TERM_PROGRAM_VERSION=3.0.12",
|
||||||
|
"TERM_SESSION_ID=w0t0p0:6D29EB08-1B96-41B8-8672-0B035605AEE5",
|
||||||
|
"ZSH=/Users/zoon/.oh-my-zsh",
|
||||||
|
"USER=zoon",
|
||||||
|
"SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.5ZcNGIwTRZ/Listeners",
|
||||||
|
"__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0",
|
||||||
|
"MAKELEVEL=2",
|
||||||
|
"PAGER=less",
|
||||||
|
"MFLAGS=",
|
||||||
|
"LSCOLORS=Gxfxcxdxbxegedabagacad",
|
||||||
|
"PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/zoon/Projects/gopath/bin",
|
||||||
|
"_=/usr/local/bin/protoc",
|
||||||
|
"PWD=/Users/zoon/Projects/gopath/src/github.com/protoc-gen-gotemplate/examples/dummy",
|
||||||
|
"JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home",
|
||||||
|
"EDITOR=micro",
|
||||||
"LANG=en_US.UTF-8",
|
"LANG=en_US.UTF-8",
|
||||||
"GOPATH=/Users/moul/go",
|
"ANDROID_SDK=/usr/local/opt/android-sdk",
|
||||||
|
"ITERM_PROFILE=Default",
|
||||||
|
"XPC_FLAGS=0x0",
|
||||||
|
"XPC_SERVICE_NAME=0",
|
||||||
|
"COLORFGBG=15;0",
|
||||||
|
"SHLVL=3",
|
||||||
|
"HOME=/Users/zoon",
|
||||||
|
"ITERM_SESSION_ID=w0t0p0:6D29EB08-1B96-41B8-8672-0B035605AEE5",
|
||||||
|
"LESS=-R",
|
||||||
|
"LOGNAME=zoon",
|
||||||
|
"LC_CTYPE=UTF-8",
|
||||||
|
"GOPATH=/Users/zoon/Projects/gopath"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,43 +0,0 @@
|
|||||||
// GENERATED CODE -- DO NOT EDIT!
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
var grpc = require('grpc');
|
|
||||||
var helloworld_pb = require('./helloworld_pb.js');
|
|
||||||
|
|
||||||
function serialize_helloworld_HelloRequest(arg) {
|
|
||||||
if (!(arg instanceof helloworld_pb.HelloRequest)) {
|
|
||||||
throw new Error('Expected argument of type helloworld.HelloRequest');
|
|
||||||
}
|
|
||||||
return new Buffer(arg.serializeBinary());
|
|
||||||
}
|
|
||||||
|
|
||||||
function deserialize_helloworld_HelloRequest(buffer_arg) {
|
|
||||||
return helloworld_pb.HelloRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
||||||
}
|
|
||||||
|
|
||||||
function serialize_helloworld_HelloReply(arg) {
|
|
||||||
if (!(arg instanceof helloworld_pb.HelloReply)) {
|
|
||||||
throw new Error('Expected argument of type helloworld.HelloReply');
|
|
||||||
}
|
|
||||||
return new Buffer(arg.serializeBinary());
|
|
||||||
}
|
|
||||||
|
|
||||||
function deserialize_helloworld_HelloReply(buffer_arg) {
|
|
||||||
return helloworld_pb.HelloReply.deserializeBinary(new Uint8Array(buffer_arg));
|
|
||||||
}
|
|
||||||
|
|
||||||
var GreeterService = exports.GreeterService = {
|
|
||||||
sayHello: {
|
|
||||||
path: '/helloworld.Greeter/SayHello',
|
|
||||||
requestStream: false,
|
|
||||||
responseStream: false,
|
|
||||||
requestType: helloworld_pb.HelloRequest,
|
|
||||||
responseType: helloworld_pb.HelloReply,
|
|
||||||
requestSerialize: serialize_helloworld_HelloRequest,
|
|
||||||
requestDeserialize: deserialize_helloworld_HelloRequest,
|
|
||||||
responseSerialize: serialize_helloworld_HelloReply,
|
|
||||||
responseDeserialize: deserialize_helloworld_HelloReply,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
exports.GreeterClient = grpc.makeGenericClientConstructor(GreeterService);
|
|
@ -1,288 +0,0 @@
|
|||||||
// GENERATED CODE -- DO NOT EDIT!
|
|
||||||
|
|
||||||
var jspb = require('google-protobuf');
|
|
||||||
var goog = jspb;
|
|
||||||
var global = Function('return this')();
|
|
||||||
|
|
||||||
goog.exportSymbol('proto.helloworld.HelloRequest', null, global);
|
|
||||||
goog.exportSymbol('proto.helloworld.HelloReply', null, global);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
||||||
* server response, or constructed directly in Javascript. The array is used
|
|
||||||
* in place and becomes part of the constructed object. It is not cloned.
|
|
||||||
* If no data is provided, the constructed object will be empty, but still
|
|
||||||
* valid.
|
|
||||||
* @extends {jspb.Message}
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloRequest = function(opt_data) {
|
|
||||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
||||||
};
|
|
||||||
goog.inherits(proto.helloworld.HelloRequest, jspb.Message);
|
|
||||||
if (goog.DEBUG && !COMPILED) {
|
|
||||||
proto.helloworld.HelloRequest.displayName = 'proto.helloworld.HelloRequest';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
||||||
/**
|
|
||||||
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
||||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
||||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
||||||
* For the list of reserved names please see:
|
|
||||||
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
||||||
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
||||||
* for transitional soy proto support: http://goto/soy-param-migration
|
|
||||||
* @return {!Object}
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloRequest.prototype.toObject = function(opt_includeInstance) {
|
|
||||||
return proto.helloworld.HelloRequest.toObject(opt_includeInstance, this);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static version of the {@see toObject} method.
|
|
||||||
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
||||||
* instance for transitional soy proto support:
|
|
||||||
* http://goto/soy-param-migration
|
|
||||||
* @param {!proto.helloworld.HelloRequest} msg The msg instance to transform.
|
|
||||||
* @return {!Object}
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloRequest.toObject = function(includeInstance, msg) {
|
|
||||||
var f, obj = {
|
|
||||||
name: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
||||||
};
|
|
||||||
|
|
||||||
if (includeInstance) {
|
|
||||||
obj.$jspbMessageInstance = msg;
|
|
||||||
}
|
|
||||||
return obj;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deserializes binary data (in protobuf wire format).
|
|
||||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
||||||
* @return {!proto.helloworld.HelloRequest}
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloRequest.deserializeBinary = function(bytes) {
|
|
||||||
var reader = new jspb.BinaryReader(bytes);
|
|
||||||
var msg = new proto.helloworld.HelloRequest;
|
|
||||||
return proto.helloworld.HelloRequest.deserializeBinaryFromReader(msg, reader);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deserializes binary data (in protobuf wire format) from the
|
|
||||||
* given reader into the given message object.
|
|
||||||
* @param {!proto.helloworld.HelloRequest} msg The message object to deserialize into.
|
|
||||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
||||||
* @return {!proto.helloworld.HelloRequest}
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
||||||
while (reader.nextField()) {
|
|
||||||
if (reader.isEndGroup()) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
var field = reader.getFieldNumber();
|
|
||||||
switch (field) {
|
|
||||||
case 1:
|
|
||||||
var value = /** @type {string} */ (reader.readString());
|
|
||||||
msg.setName(value);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
reader.skipField();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return msg;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class method variant: serializes the given message to binary data
|
|
||||||
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
||||||
* @param {!proto.helloworld.HelloRequest} message
|
|
||||||
* @param {!jspb.BinaryWriter} writer
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloRequest.serializeBinaryToWriter = function(message, writer) {
|
|
||||||
message.serializeBinaryToWriter(writer);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Serializes the message to binary data (in protobuf wire format).
|
|
||||||
* @return {!Uint8Array}
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloRequest.prototype.serializeBinary = function() {
|
|
||||||
var writer = new jspb.BinaryWriter();
|
|
||||||
this.serializeBinaryToWriter(writer);
|
|
||||||
return writer.getResultBuffer();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Serializes the message to binary data (in protobuf wire format),
|
|
||||||
* writing to the given BinaryWriter.
|
|
||||||
* @param {!jspb.BinaryWriter} writer
|
|
||||||
*/
|
|
||||||
proto.helloworld.name.prototype.serializeBinaryToWriter = function (writer) {
|
|
||||||
var f = undefined;
|
|
||||||
f = this.getName();
|
|
||||||
if (f.length > 0) {
|
|
||||||
writer.writeString(
|
|
||||||
1,
|
|
||||||
f
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* optional string name = 1;
|
|
||||||
* @return {string}
|
|
||||||
*/
|
|
||||||
proto.helloworld.name.prototype.getName = function() {
|
|
||||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
||||||
};
|
|
||||||
|
|
||||||
/** @param {string} value */
|
|
||||||
proto.helloworld.name.prototype.setName = function(value) {
|
|
||||||
jspb.Message.setField(this, 1, value);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
||||||
* server response, or constructed directly in Javascript. The array is used
|
|
||||||
* in place and becomes part of the constructed object. It is not cloned.
|
|
||||||
* If no data is provided, the constructed object will be empty, but still
|
|
||||||
* valid.
|
|
||||||
* @extends {jspb.Message}
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloReply = function(opt_data) {
|
|
||||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
||||||
};
|
|
||||||
goog.inherits(proto.helloworld.HelloReply, jspb.Message);
|
|
||||||
if (goog.DEBUG && !COMPILED) {
|
|
||||||
proto.helloworld.HelloReply.displayName = 'proto.helloworld.HelloReply';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
||||||
/**
|
|
||||||
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
||||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
||||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
||||||
* For the list of reserved names please see:
|
|
||||||
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
||||||
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
||||||
* for transitional soy proto support: http://goto/soy-param-migration
|
|
||||||
* @return {!Object}
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloReply.prototype.toObject = function(opt_includeInstance) {
|
|
||||||
return proto.helloworld.HelloReply.toObject(opt_includeInstance, this);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static version of the {@see toObject} method.
|
|
||||||
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
||||||
* instance for transitional soy proto support:
|
|
||||||
* http://goto/soy-param-migration
|
|
||||||
* @param {!proto.helloworld.HelloReply} msg The msg instance to transform.
|
|
||||||
* @return {!Object}
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloReply.toObject = function(includeInstance, msg) {
|
|
||||||
var f, obj = {
|
|
||||||
name: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
||||||
};
|
|
||||||
|
|
||||||
if (includeInstance) {
|
|
||||||
obj.$jspbMessageInstance = msg;
|
|
||||||
}
|
|
||||||
return obj;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deserializes binary data (in protobuf wire format).
|
|
||||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
||||||
* @return {!proto.helloworld.HelloReply}
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloReply.deserializeBinary = function(bytes) {
|
|
||||||
var reader = new jspb.BinaryReader(bytes);
|
|
||||||
var msg = new proto.helloworld.HelloReply;
|
|
||||||
return proto.helloworld.HelloReply.deserializeBinaryFromReader(msg, reader);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deserializes binary data (in protobuf wire format) from the
|
|
||||||
* given reader into the given message object.
|
|
||||||
* @param {!proto.helloworld.HelloReply} msg The message object to deserialize into.
|
|
||||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
||||||
* @return {!proto.helloworld.HelloReply}
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloReply.deserializeBinaryFromReader = function(msg, reader) {
|
|
||||||
while (reader.nextField()) {
|
|
||||||
if (reader.isEndGroup()) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
var field = reader.getFieldNumber();
|
|
||||||
switch (field) {
|
|
||||||
case 1:
|
|
||||||
var value = /** @type {string} */ (reader.readString());
|
|
||||||
msg.setName(value);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
reader.skipField();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return msg;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class method variant: serializes the given message to binary data
|
|
||||||
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
||||||
* @param {!proto.helloworld.HelloReply} message
|
|
||||||
* @param {!jspb.BinaryWriter} writer
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloReply.serializeBinaryToWriter = function(message, writer) {
|
|
||||||
message.serializeBinaryToWriter(writer);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Serializes the message to binary data (in protobuf wire format).
|
|
||||||
* @return {!Uint8Array}
|
|
||||||
*/
|
|
||||||
proto.helloworld.HelloReply.prototype.serializeBinary = function() {
|
|
||||||
var writer = new jspb.BinaryWriter();
|
|
||||||
this.serializeBinaryToWriter(writer);
|
|
||||||
return writer.getResultBuffer();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Serializes the message to binary data (in protobuf wire format),
|
|
||||||
* writing to the given BinaryWriter.
|
|
||||||
* @param {!jspb.BinaryWriter} writer
|
|
||||||
*/
|
|
||||||
proto.helloworld.message.prototype.serializeBinaryToWriter = function (writer) {
|
|
||||||
var f = undefined;
|
|
||||||
f = this.getMessage();
|
|
||||||
if (f.length > 0) {
|
|
||||||
writer.writeString(
|
|
||||||
1,
|
|
||||||
f
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* optional string name = 1;
|
|
||||||
* @return {string}
|
|
||||||
*/
|
|
||||||
proto.helloworld.message.prototype.getMessage = function() {
|
|
||||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
||||||
};
|
|
||||||
|
|
||||||
/** @param {string} value */
|
|
||||||
proto.helloworld.message.prototype.setMessage = function(value) {
|
|
||||||
jspb.Message.setField(this, 1, value);
|
|
||||||
};
|
|
||||||
|
|
||||||
goog.object.extend(exports, proto.helloworld);
|
|
146
examples/js-grpc/output/test/test_grpc_js.js
Normal file
146
examples/js-grpc/output/test/test_grpc_js.js
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
var grpc = require('grpc');
|
||||||
|
var test_pb = require('./test_pb.js');
|
||||||
|
|
||||||
|
|
||||||
|
function serialize_test_TestNoStreamRequest(arg) {
|
||||||
|
if (!(arg instanceof test_pb.TestNoStreamRequest)) {
|
||||||
|
throw new Error('Expected argument of type test.TestNoStreamRequest');
|
||||||
|
}
|
||||||
|
return new Buffer(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_test_TestNoStreamRequest(buffer_arg) {
|
||||||
|
return test_pb.TestNoStreamRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_test_TestNoStreamReply(arg) {
|
||||||
|
if (!(arg instanceof test_pb.TestNoStreamReply)) {
|
||||||
|
throw new Error('Expected argument of type test.TestNoStreamReply');
|
||||||
|
}
|
||||||
|
return new Buffer(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_test_TestNoStreamReply(buffer_arg) {
|
||||||
|
return test_pb.TestNoStreamReply.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_test_TestStreamRequestRequest(arg) {
|
||||||
|
if (!(arg instanceof test_pb.TestStreamRequestRequest)) {
|
||||||
|
throw new Error('Expected argument of type test.TestStreamRequestRequest');
|
||||||
|
}
|
||||||
|
return new Buffer(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_test_TestStreamRequestRequest(buffer_arg) {
|
||||||
|
return test_pb.TestStreamRequestRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_test_TestStreamRequestReply(arg) {
|
||||||
|
if (!(arg instanceof test_pb.TestStreamRequestReply)) {
|
||||||
|
throw new Error('Expected argument of type test.TestStreamRequestReply');
|
||||||
|
}
|
||||||
|
return new Buffer(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_test_TestStreamRequestReply(buffer_arg) {
|
||||||
|
return test_pb.TestStreamRequestReply.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_test_TestStreamReplyRequest(arg) {
|
||||||
|
if (!(arg instanceof test_pb.TestStreamReplyRequest)) {
|
||||||
|
throw new Error('Expected argument of type test.TestStreamReplyRequest');
|
||||||
|
}
|
||||||
|
return new Buffer(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_test_TestStreamReplyRequest(buffer_arg) {
|
||||||
|
return test_pb.TestStreamReplyRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_test_TestStreamReplyReply(arg) {
|
||||||
|
if (!(arg instanceof test_pb.TestStreamReplyReply)) {
|
||||||
|
throw new Error('Expected argument of type test.TestStreamReplyReply');
|
||||||
|
}
|
||||||
|
return new Buffer(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_test_TestStreamReplyReply(buffer_arg) {
|
||||||
|
return test_pb.TestStreamReplyReply.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_test_TestStreamBothRequest(arg) {
|
||||||
|
if (!(arg instanceof test_pb.TestStreamBothRequest)) {
|
||||||
|
throw new Error('Expected argument of type test.TestStreamBothRequest');
|
||||||
|
}
|
||||||
|
return new Buffer(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_test_TestStreamBothRequest(buffer_arg) {
|
||||||
|
return test_pb.TestStreamBothRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_test_TestStreamBothReply(arg) {
|
||||||
|
if (!(arg instanceof test_pb.TestStreamBothReply)) {
|
||||||
|
throw new Error('Expected argument of type test.TestStreamBothReply');
|
||||||
|
}
|
||||||
|
return new Buffer(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_test_TestStreamBothReply(buffer_arg) {
|
||||||
|
return test_pb.TestStreamBothReply.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var TestServiceService = exports.TestServiceService = {
|
||||||
|
|
||||||
|
testNoStream: {
|
||||||
|
path: '/test.TestService/TestNoStream',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: test_pb.TestNoStreamRequest,
|
||||||
|
responseType: test_pb.TestNoStreamReply,
|
||||||
|
requestSerialize: serialize_test_TestNoStreamRequest,
|
||||||
|
requestDeserialize: deserialize_test_TestNoStreamRequest,
|
||||||
|
responseSerialize: serialize_test_TestNoStreamReply,
|
||||||
|
responseDeserialize: deserialize_test_TestNoStreamReply,
|
||||||
|
},
|
||||||
|
testStreamRequest: {
|
||||||
|
path: '/test.TestService/TestStreamRequest',
|
||||||
|
requestStream: true,
|
||||||
|
responseStream: false,
|
||||||
|
requestType: test_pb.TestStreamRequestRequest,
|
||||||
|
responseType: test_pb.TestStreamRequestReply,
|
||||||
|
requestSerialize: serialize_test_TestStreamRequestRequest,
|
||||||
|
requestDeserialize: deserialize_test_TestStreamRequestRequest,
|
||||||
|
responseSerialize: serialize_test_TestStreamRequestReply,
|
||||||
|
responseDeserialize: deserialize_test_TestStreamRequestReply,
|
||||||
|
},
|
||||||
|
testStreamReply: {
|
||||||
|
path: '/test.TestService/TestStreamReply',
|
||||||
|
requestStream: false,
|
||||||
|
responseStream: true,
|
||||||
|
requestType: test_pb.TestStreamReplyRequest,
|
||||||
|
responseType: test_pb.TestStreamReplyReply,
|
||||||
|
requestSerialize: serialize_test_TestStreamReplyRequest,
|
||||||
|
requestDeserialize: deserialize_test_TestStreamReplyRequest,
|
||||||
|
responseSerialize: serialize_test_TestStreamReplyReply,
|
||||||
|
responseDeserialize: deserialize_test_TestStreamReplyReply,
|
||||||
|
},
|
||||||
|
testStreamBoth: {
|
||||||
|
path: '/test.TestService/TestStreamBoth',
|
||||||
|
requestStream: true,
|
||||||
|
responseStream: true,
|
||||||
|
requestType: test_pb.TestStreamBothRequest,
|
||||||
|
responseType: test_pb.TestStreamBothReply,
|
||||||
|
requestSerialize: serialize_test_TestStreamBothRequest,
|
||||||
|
requestDeserialize: deserialize_test_TestStreamBothRequest,
|
||||||
|
responseSerialize: serialize_test_TestStreamBothReply,
|
||||||
|
responseDeserialize: deserialize_test_TestStreamBothReply,
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.TestServiceClient = grpc.makeGenericClientConstructor(TestServiceService);
|
@ -1,53 +0,0 @@
|
|||||||
// Copyright 2015, Google Inc.
|
|
||||||
// All rights reserved.
|
|
||||||
//
|
|
||||||
// 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.
|
|
||||||
// * Neither the name of Google Inc. nor the names of its
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// 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 = "proto3";
|
|
||||||
|
|
||||||
option java_multiple_files = true;
|
|
||||||
option java_package = "io.grpc.examples.helloworld";
|
|
||||||
option java_outer_classname = "HelloWorldProto";
|
|
||||||
option objc_class_prefix = "HLW";
|
|
||||||
|
|
||||||
package helloworld;
|
|
||||||
|
|
||||||
// The greeting service definition.
|
|
||||||
service Greeter {
|
|
||||||
// Sends a greeting
|
|
||||||
rpc SayHello (HelloRequest) returns (HelloReply) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
// The request message containing the user's name.
|
|
||||||
message HelloRequest {
|
|
||||||
string name = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// The response message containing the greetings
|
|
||||||
message HelloReply {
|
|
||||||
string message = 1;
|
|
||||||
}
|
|
34
examples/js-grpc/protos/test.proto
Normal file
34
examples/js-grpc/protos/test.proto
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package test;
|
||||||
|
|
||||||
|
option go_package = "github.com/united-drivers/models/go/test;testpb";
|
||||||
|
|
||||||
|
service TestService {
|
||||||
|
rpc TestNoStream(TestNoStreamRequest) returns (TestNoStreamReply);
|
||||||
|
rpc TestStreamRequest(stream TestStreamRequestRequest) returns (TestStreamRequestReply);
|
||||||
|
rpc TestStreamReply(TestStreamReplyRequest) returns (stream TestStreamReplyReply);
|
||||||
|
rpc TestStreamBoth(stream TestStreamBothRequest) returns (stream TestStreamBothReply);
|
||||||
|
}
|
||||||
|
|
||||||
|
message TestMessage {
|
||||||
|
string a = 1;
|
||||||
|
int32 b = 2;
|
||||||
|
int64 c = 3;
|
||||||
|
float d = 4;
|
||||||
|
double e = 5;
|
||||||
|
repeated string n = 14;
|
||||||
|
repeated int32 o = 15;
|
||||||
|
repeated int64 p = 16;
|
||||||
|
repeated float q = 17;
|
||||||
|
repeated double r = 18;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TestNoStreamRequest { TestMessage message = 1; }
|
||||||
|
message TestNoStreamReply { TestMessage message = 1; string err_msg = 2; }
|
||||||
|
message TestStreamRequestRequest { TestMessage message = 1; }
|
||||||
|
message TestStreamRequestReply { TestMessage message = 1; string err_msg = 2; }
|
||||||
|
message TestStreamReplyRequest { TestMessage message = 1; }
|
||||||
|
message TestStreamReplyReply { TestMessage message = 1; string err_msg = 2; }
|
||||||
|
message TestStreamBothRequest { TestMessage message = 1; }
|
||||||
|
message TestStreamBothReply { TestMessage message = 1; string err_msg = 2; }
|
@ -0,0 +1,47 @@
|
|||||||
|
// GENERATED CODE -- DO NOT EDIT!
|
||||||
|
{{$Package:=.File.Package}}
|
||||||
|
'use strict';
|
||||||
|
var grpc = require('grpc');
|
||||||
|
var {{$Package}}_pb = require('./{{$Package}}_pb.js');
|
||||||
|
|
||||||
|
{{range .File.Service}}{{range .Method}}
|
||||||
|
function serialize_{{$Package}}_{{.InputType | splitArray "." | last}}(arg) {
|
||||||
|
if (!(arg instanceof {{$Package}}_pb.{{.InputType | splitArray "." | last}})) {
|
||||||
|
throw new Error('Expected argument of type {{$Package}}.{{.InputType | splitArray "." | last}}');
|
||||||
|
}
|
||||||
|
return new Buffer(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_{{$Package}}_{{.InputType | splitArray "." | last}}(buffer_arg) {
|
||||||
|
return {{$Package}}_pb.{{.InputType | splitArray "." | last}}.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
|
||||||
|
function serialize_{{$Package}}_{{.OutputType | splitArray "." | last}}(arg) {
|
||||||
|
if (!(arg instanceof {{$Package}}_pb.{{.OutputType | splitArray "." | last}})) {
|
||||||
|
throw new Error('Expected argument of type {{$Package}}.{{.OutputType | splitArray "." | last}}');
|
||||||
|
}
|
||||||
|
return new Buffer(arg.serializeBinary());
|
||||||
|
}
|
||||||
|
|
||||||
|
function deserialize_{{$Package}}_{{.OutputType | splitArray "." | last}}(buffer_arg) {
|
||||||
|
return {{$Package}}_pb.{{.OutputType | splitArray "." | last}}.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
|
}
|
||||||
|
{{end}}{{end}}
|
||||||
|
{{range .File.Service}}
|
||||||
|
var {{.Name}}Service = exports.{{.Name}}Service = {
|
||||||
|
{{$serviceName:=.Name}}
|
||||||
|
{{range .Method}}{{.Name | lowerCamelCase}}: {
|
||||||
|
path: '/{{$Package}}.{{$serviceName}}/{{.Name}}',
|
||||||
|
requestStream: {{.ClientStreaming | default "false"}},
|
||||||
|
responseStream: {{.ServerStreaming | default "false"}},
|
||||||
|
requestType: {{$Package}}_pb.{{.InputType | splitArray "." | last}},
|
||||||
|
responseType: {{$Package}}_pb.{{.OutputType | splitArray "." | last}},
|
||||||
|
requestSerialize: serialize_{{$Package}}_{{.InputType | splitArray "." | last}},
|
||||||
|
requestDeserialize: deserialize_{{$Package}}_{{.InputType | splitArray "." | last}},
|
||||||
|
responseSerialize: serialize_{{$Package}}_{{.OutputType | splitArray "." | last}},
|
||||||
|
responseDeserialize: deserialize_{{$Package}}_{{.OutputType | splitArray "." | last}},
|
||||||
|
},
|
||||||
|
{{end}}
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.{{.Name}}Client = grpc.makeGenericClientConstructor({{.Name}}Service);{{end}}
|
@ -1,148 +0,0 @@
|
|||||||
// GENERATED CODE -- DO NOT EDIT!
|
|
||||||
{{$Package:=.File.Package}}
|
|
||||||
var jspb = require('google-protobuf');
|
|
||||||
var goog = jspb;
|
|
||||||
var global = Function('return this')();
|
|
||||||
{{range .File.MessageType}}
|
|
||||||
goog.exportSymbol('proto.{{$Package}}.{{.Name}}', null, global);{{end}}
|
|
||||||
{{range .File.MessageType}}
|
|
||||||
/**
|
|
||||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
||||||
* server response, or constructed directly in Javascript. The array is used
|
|
||||||
* in place and becomes part of the constructed object. It is not cloned.
|
|
||||||
* If no data is provided, the constructed object will be empty, but still
|
|
||||||
* valid.
|
|
||||||
* @extends {jspb.Message}
|
|
||||||
* @constructor
|
|
||||||
*/
|
|
||||||
proto.{{$Package}}.{{.Name}} = function(opt_data) {
|
|
||||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
||||||
};
|
|
||||||
goog.inherits(proto.{{$Package}}.{{.Name}}, jspb.Message);
|
|
||||||
if (goog.DEBUG && !COMPILED) {
|
|
||||||
proto.{{$Package}}.{{.Name}}.displayName = 'proto.{{$Package}}.{{.Name}}';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
||||||
/**
|
|
||||||
* Creates an object representation of this proto suitable for use in Soy templates.
|
|
||||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
||||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
||||||
* For the list of reserved names please see:
|
|
||||||
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
|
|
||||||
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
|
|
||||||
* for transitional soy proto support: http://goto/soy-param-migration
|
|
||||||
* @return {!Object}
|
|
||||||
*/
|
|
||||||
proto.{{$Package}}.{{.Name}}.prototype.toObject = function(opt_includeInstance) {
|
|
||||||
return proto.{{$Package}}.{{.Name}}.toObject(opt_includeInstance, this);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Static version of the {@see toObject} method.
|
|
||||||
* @param {boolean|undefined} includeInstance Whether to include the JSPB
|
|
||||||
* instance for transitional soy proto support:
|
|
||||||
* http://goto/soy-param-migration
|
|
||||||
* @param {!proto.{{$Package}}.{{.Name}}} msg The msg instance to transform.
|
|
||||||
* @return {!Object}
|
|
||||||
*/
|
|
||||||
proto.{{$Package}}.{{.Name}}.toObject = function(includeInstance, msg) {
|
|
||||||
var f, obj = {
|
|
||||||
name: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
||||||
};
|
|
||||||
|
|
||||||
if (includeInstance) {
|
|
||||||
obj.$jspbMessageInstance = msg;
|
|
||||||
}
|
|
||||||
return obj;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deserializes binary data (in protobuf wire format).
|
|
||||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
||||||
* @return {!proto.{{$Package}}.{{.Name}}}
|
|
||||||
*/
|
|
||||||
proto.{{$Package}}.{{.Name}}.deserializeBinary = function(bytes) {
|
|
||||||
var reader = new jspb.BinaryReader(bytes);
|
|
||||||
var msg = new proto.{{$Package}}.{{.Name}};
|
|
||||||
return proto.{{$Package}}.{{.Name}}.deserializeBinaryFromReader(msg, reader);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deserializes binary data (in protobuf wire format) from the
|
|
||||||
* given reader into the given message object.
|
|
||||||
* @param {!proto.{{$Package}}.{{.Name}}} msg The message object to deserialize into.
|
|
||||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
||||||
* @return {!proto.{{$Package}}.{{.Name}}}
|
|
||||||
*/
|
|
||||||
proto.{{$Package}}.{{.Name}}.deserializeBinaryFromReader = function(msg, reader) {
|
|
||||||
while (reader.nextField()) {
|
|
||||||
if (reader.isEndGroup()) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
var field = reader.getFieldNumber();
|
|
||||||
switch (field) {
|
|
||||||
case 1:
|
|
||||||
var value = /** @type {string} */ (reader.readString());
|
|
||||||
msg.setName(value);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
reader.skipField();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return msg;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class method variant: serializes the given message to binary data
|
|
||||||
* (in protobuf wire format), writing to the given BinaryWriter.
|
|
||||||
* @param {!proto.{{$Package}}.{{.Name}}} message
|
|
||||||
* @param {!jspb.BinaryWriter} writer
|
|
||||||
*/
|
|
||||||
proto.{{$Package}}.{{.Name}}.serializeBinaryToWriter = function(message, writer) {
|
|
||||||
message.serializeBinaryToWriter(writer);
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Serializes the message to binary data (in protobuf wire format).
|
|
||||||
* @return {!Uint8Array}
|
|
||||||
*/
|
|
||||||
proto.{{$Package}}.{{.Name}}.prototype.serializeBinary = function() {
|
|
||||||
var writer = new jspb.BinaryWriter();
|
|
||||||
this.serializeBinaryToWriter(writer);
|
|
||||||
return writer.getResultBuffer();
|
|
||||||
};
|
|
||||||
|
|
||||||
{{range .Field}}
|
|
||||||
/**
|
|
||||||
* Serializes the message to binary data (in protobuf wire format),
|
|
||||||
* writing to the given BinaryWriter.
|
|
||||||
* @param {!jspb.BinaryWriter} writer
|
|
||||||
*/
|
|
||||||
proto.{{$Package}}.{{.Name}}.prototype.serializeBinaryToWriter = function (writer) {
|
|
||||||
var f = undefined;
|
|
||||||
f = this.get{{.Name | upperFirst}}();
|
|
||||||
if (f.length > 0) {
|
|
||||||
writer.writeString(
|
|
||||||
1,
|
|
||||||
f
|
|
||||||
);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* optional string name = 1;
|
|
||||||
* @return {string}
|
|
||||||
*/
|
|
||||||
proto.{{$Package}}.{{.Name}}.prototype.get{{.Name | upperFirst}} = function() {
|
|
||||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
||||||
};
|
|
||||||
|
|
||||||
/** @param {string} value */
|
|
||||||
proto.{{$Package}}.{{.Name}}.prototype.set{{.Name | upperFirst}} = function(value) {
|
|
||||||
jspb.Message.setField(this, 1, value);
|
|
||||||
};
|
|
||||||
{{end}}{{end}}
|
|
||||||
goog.object.extend(exports, proto.{{$Package}});
|
|
@ -24,10 +24,11 @@ function serialize_{{$Package}}_{{.OutputType | splitArray "." | last}}(arg) {
|
|||||||
|
|
||||||
function deserialize_{{$Package}}_{{.OutputType | splitArray "." | last}}(buffer_arg) {
|
function deserialize_{{$Package}}_{{.OutputType | splitArray "." | last}}(buffer_arg) {
|
||||||
return {{$Package}}_pb.{{.OutputType | splitArray "." | last}}.deserializeBinary(new Uint8Array(buffer_arg));
|
return {{$Package}}_pb.{{.OutputType | splitArray "." | last}}.deserializeBinary(new Uint8Array(buffer_arg));
|
||||||
}{{end}}{{end}}
|
}
|
||||||
|
{{end}}{{end}}
|
||||||
{{range .File.Service}}
|
{{range .File.Service}}
|
||||||
var {{.Name}}Service = exports.{{.Name}}Service = {
|
var {{.Name}}Service = exports.{{.Name}}Service = {
|
||||||
{{$serviceName:=.Name}}{{range .Method}}{{.Name | lowerFirst}}: {
|
{{$serviceName:=.Name}}{{range .Method}}{{.Name | lowerCamelCase}}: {
|
||||||
path: '/{{$Package}}.{{$serviceName}}/{{.Name}}',
|
path: '/{{$Package}}.{{$serviceName}}/{{.Name}}',
|
||||||
requestStream: {{.ClientStreaming | default "false"}},
|
requestStream: {{.ClientStreaming | default "false"}},
|
||||||
responseStream: {{.ServerStreaming | default "false"}},
|
responseStream: {{.ServerStreaming | default "false"}},
|
10
glide.lock
generated
10
glide.lock
generated
@ -1,19 +1,21 @@
|
|||||||
hash: f044e7016f8e72eb5deff471923e17f1fbc26046692649b3289220d2cab9e68a
|
hash: 488701437e53b39667ed5a84ed1500e727ea8d4902d804c3ea7eb50b1fc022a1
|
||||||
updated: 2016-12-15T13:43:12.466003615+01:00
|
updated: 2016-12-20T11:08:43.124170177+01:00
|
||||||
imports:
|
imports:
|
||||||
- name: github.com/aokoli/goutils
|
- name: github.com/aokoli/goutils
|
||||||
version: 9c37978a95bd5c709a15883b6242714ea6709e64
|
version: 9c37978a95bd5c709a15883b6242714ea6709e64
|
||||||
- name: github.com/golang/protobuf
|
- name: github.com/golang/protobuf
|
||||||
version: 8ee79997227bf9b34611aee7946ae64735e6fd93
|
version: 98fa357170587e470c5f27d3c3ea0947b71eb455
|
||||||
subpackages:
|
subpackages:
|
||||||
- proto
|
- proto
|
||||||
- protoc-gen-go/descriptor
|
- protoc-gen-go/descriptor
|
||||||
- protoc-gen-go/generator
|
- protoc-gen-go/generator
|
||||||
- protoc-gen-go/plugin
|
- protoc-gen-go/plugin
|
||||||
|
- name: github.com/huandu/xstrings
|
||||||
|
version: 3959339b333561bf62a38b424fd41517c2c90f40
|
||||||
- name: github.com/kr/fs
|
- name: github.com/kr/fs
|
||||||
version: 2788f0dbd16903de03cb8186e5c7d97b69ad387b
|
version: 2788f0dbd16903de03cb8186e5c7d97b69ad387b
|
||||||
- name: github.com/Masterminds/sprig
|
- name: github.com/Masterminds/sprig
|
||||||
version: 69011c0cd9b4d2e0733c4d9e2c8e2a5a0d0a2f2f
|
version: 1e60e4ce482a1e2c7b9c9be667535ef152e04300
|
||||||
- name: github.com/satori/go.uuid
|
- name: github.com/satori/go.uuid
|
||||||
version: 879c5887cd475cd7864858769793b2ceb0d44feb
|
version: 879c5887cd475cd7864858769793b2ceb0d44feb
|
||||||
testImports: []
|
testImports: []
|
||||||
|
@ -8,3 +8,4 @@ import:
|
|||||||
- protoc-gen-go/plugin
|
- protoc-gen-go/plugin
|
||||||
- package: github.com/kr/fs
|
- package: github.com/kr/fs
|
||||||
- package: github.com/Masterminds/sprig
|
- package: github.com/Masterminds/sprig
|
||||||
|
- package: github.com/huandu/xstrings
|
||||||
|
14
helpers.go
14
helpers.go
@ -6,6 +6,7 @@ import (
|
|||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/Masterminds/sprig"
|
"github.com/Masterminds/sprig"
|
||||||
|
"github.com/huandu/xstrings"
|
||||||
)
|
)
|
||||||
|
|
||||||
var ProtoHelpersFuncMap = template.FuncMap{
|
var ProtoHelpersFuncMap = template.FuncMap{
|
||||||
@ -37,6 +38,19 @@ var ProtoHelpersFuncMap = template.FuncMap{
|
|||||||
"lowerFirst": func(s string) string {
|
"lowerFirst": func(s string) string {
|
||||||
return strings.ToLower(s[:1]) + s[1:]
|
return strings.ToLower(s[:1]) + s[1:]
|
||||||
},
|
},
|
||||||
|
"camelCase": func(s string) string {
|
||||||
|
return xstrings.ToCamelCase(s)
|
||||||
|
},
|
||||||
|
"lowerCamelCase": func(s string) string {
|
||||||
|
cc := xstrings.ToCamelCase(s)
|
||||||
|
return strings.ToLower(cc[:1]) + cc[1:]
|
||||||
|
},
|
||||||
|
"snakeCase": func(s string) string {
|
||||||
|
return xstrings.ToSnakeCase(s)
|
||||||
|
},
|
||||||
|
"kebabCase": func(s string) string {
|
||||||
|
return strings.Replace(xstrings.ToSnakeCase(s), "_", "-", -1)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
7
vendor/github.com/Masterminds/sprig/README.md
generated
vendored
7
vendor/github.com/Masterminds/sprig/README.md
generated
vendored
@ -166,13 +166,6 @@ parse, it returns the time unaltered. See `time.ParseDuration` for info on durat
|
|||||||
follows: []byte are converted, fmt.Stringers will have String() called.
|
follows: []byte are converted, fmt.Stringers will have String() called.
|
||||||
errors will have Error() called. All others will be passed through
|
errors will have Error() called. All others will be passed through
|
||||||
fmt.Sprtinf("%v").
|
fmt.Sprtinf("%v").
|
||||||
- set: Takes a dict, a key, and a value, and sets that key/value pair in
|
|
||||||
the dict. `set $dict $key $value`. For convenience, it returns the dict,
|
|
||||||
even though the dict was modified in place.
|
|
||||||
- unset: Takes a dict and a key, and deletes that key/value pair from the
|
|
||||||
dict. `unset $dict $key`. This returns the dict for convenience.
|
|
||||||
- hasKey: Takes a dict and a key, and returns boolean true if the key is in
|
|
||||||
the dict.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
{{$t := tuple 1 "a" "foo"}}
|
{{$t := tuple 1 "a" "foo"}}
|
||||||
|
41
vendor/github.com/Masterminds/sprig/functions.go
generated
vendored
41
vendor/github.com/Masterminds/sprig/functions.go
generated
vendored
@ -99,14 +99,6 @@ OS:
|
|||||||
- env: Resolve an environment variable
|
- env: Resolve an environment variable
|
||||||
- expandenv: Expand a string through the environment
|
- expandenv: Expand a string through the environment
|
||||||
|
|
||||||
File Paths:
|
|
||||||
- base: Return the last element of a path. https://golang.org/pkg/path#Base
|
|
||||||
- dir: Remove the last element of a path. https://golang.org/pkg/path#Dir
|
|
||||||
- clean: Clean a path to the shortest equivalent name. (e.g. remove "foo/.."
|
|
||||||
from "foo/../bar.html") https://golang.org/pkg/path#Clean
|
|
||||||
- ext: https://golang.org/pkg/path#Ext
|
|
||||||
- isAbs: https://golang.org/pkg/path#IsAbs
|
|
||||||
|
|
||||||
Encoding:
|
Encoding:
|
||||||
- b64enc: Base 64 encode a string.
|
- b64enc: Base 64 encode a string.
|
||||||
- b64dec: Base 64 decode a string.
|
- b64dec: Base 64 decode a string.
|
||||||
@ -143,13 +135,6 @@ Data Structures:
|
|||||||
follows: []byte are converted, fmt.Stringers will have String() called.
|
follows: []byte are converted, fmt.Stringers will have String() called.
|
||||||
errors will have Error() called. All others will be passed through
|
errors will have Error() called. All others will be passed through
|
||||||
fmt.Sprtinf("%v").
|
fmt.Sprtinf("%v").
|
||||||
- set: Takes a dict, a key, and a value, and sets that key/value pair in
|
|
||||||
the dict. `set $dict $key $value`. For convenience, it returns the dict,
|
|
||||||
even though the dict was modified in place.
|
|
||||||
- unset: Takes a dict and a key, and deletes that key/value pair from the
|
|
||||||
dict. `unset $dict $key`. This returns the dict for convenience.
|
|
||||||
- hasKey: Takes a dict and a key, and returns boolean true if the key is in
|
|
||||||
the dict.
|
|
||||||
|
|
||||||
Math Functions:
|
Math Functions:
|
||||||
|
|
||||||
@ -194,7 +179,6 @@ import (
|
|||||||
"math"
|
"math"
|
||||||
"math/big"
|
"math/big"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@ -379,13 +363,6 @@ var genericMap = map[string]interface{}{
|
|||||||
"env": func(s string) string { return os.Getenv(s) },
|
"env": func(s string) string { return os.Getenv(s) },
|
||||||
"expandenv": func(s string) string { return os.ExpandEnv(s) },
|
"expandenv": func(s string) string { return os.ExpandEnv(s) },
|
||||||
|
|
||||||
// File Paths:
|
|
||||||
"base": path.Base,
|
|
||||||
"dir": path.Dir,
|
|
||||||
"clean": path.Clean,
|
|
||||||
"ext": path.Ext,
|
|
||||||
"isAbs": path.IsAbs,
|
|
||||||
|
|
||||||
// Encoding:
|
// Encoding:
|
||||||
"b64enc": base64encode,
|
"b64enc": base64encode,
|
||||||
"b64dec": base64decode,
|
"b64dec": base64decode,
|
||||||
@ -395,9 +372,6 @@ var genericMap = map[string]interface{}{
|
|||||||
// Data Structures:
|
// Data Structures:
|
||||||
"tuple": tuple,
|
"tuple": tuple,
|
||||||
"dict": dict,
|
"dict": dict,
|
||||||
"set": set,
|
|
||||||
"unset": unset,
|
|
||||||
"hasKey": hasKey,
|
|
||||||
|
|
||||||
// Crypto:
|
// Crypto:
|
||||||
"genPrivateKey": generatePrivateKey,
|
"genPrivateKey": generatePrivateKey,
|
||||||
@ -660,21 +634,6 @@ func tuple(v ...interface{}) []interface{} {
|
|||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
func set(d map[string]interface{}, key string, value interface{}) map[string]interface{} {
|
|
||||||
d[key] = value
|
|
||||||
return d
|
|
||||||
}
|
|
||||||
|
|
||||||
func unset(d map[string]interface{}, key string) map[string]interface{} {
|
|
||||||
delete(d, key)
|
|
||||||
return d
|
|
||||||
}
|
|
||||||
|
|
||||||
func hasKey(d map[string]interface{}, key string) bool {
|
|
||||||
_, ok := d[key]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
|
|
||||||
func dict(v ...interface{}) map[string]interface{} {
|
func dict(v ...interface{}) map[string]interface{} {
|
||||||
dict := map[string]interface{}{}
|
dict := map[string]interface{}{}
|
||||||
lenv := len(v)
|
lenv := len(v)
|
||||||
|
69
vendor/github.com/Masterminds/sprig/functions_test.go
generated
vendored
69
vendor/github.com/Masterminds/sprig/functions_test.go
generated
vendored
@ -12,7 +12,6 @@ import (
|
|||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"github.com/aokoli/goutils"
|
"github.com/aokoli/goutils"
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// This is woefully incomplete. Please help.
|
// This is woefully incomplete. Please help.
|
||||||
@ -285,16 +284,6 @@ func TestEmpty(t *testing.T) {
|
|||||||
if err := runt(tpl, "1"); err != nil {
|
if err := runt(tpl, "1"); err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
dict := map[string]interface{}{"top": map[string]interface{}{}}
|
|
||||||
tpl = `{{if empty .top.NoSuchThing}}1{{else}}0{{end}}`
|
|
||||||
if err := runtv(tpl, "1", dict); err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
tpl = `{{if empty .bottom.NoSuchThing}}1{{else}}0{{end}}`
|
|
||||||
if err := runtv(tpl, "1", dict); err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSplit(t *testing.T) {
|
func TestSplit(t *testing.T) {
|
||||||
@ -533,43 +522,6 @@ func TestDict(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestUnset(t *testing.T) {
|
|
||||||
tpl := `{{- $d := dict "one" 1 "two" 222222 -}}
|
|
||||||
{{- $_ := unset $d "two" -}}
|
|
||||||
{{- range $k, $v := $d}}{{$k}}{{$v}}{{- end -}}
|
|
||||||
`
|
|
||||||
|
|
||||||
expect := "one1"
|
|
||||||
if err := runt(tpl, expect); err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
func TestHasKey(t *testing.T) {
|
|
||||||
tpl := `{{- $d := dict "one" 1 "two" 222222 -}}
|
|
||||||
{{- if hasKey $d "one" -}}1{{- end -}}
|
|
||||||
`
|
|
||||||
|
|
||||||
expect := "1"
|
|
||||||
if err := runt(tpl, expect); err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestSet(t *testing.T) {
|
|
||||||
tpl := `{{- $d := dict "one" 1 "two" 222222 -}}
|
|
||||||
{{- $_ := set $d "two" 2 -}}
|
|
||||||
{{- $_ := set $d "three" 3 -}}
|
|
||||||
{{- if hasKey $d "one" -}}{{$d.one}}{{- end -}}
|
|
||||||
{{- if hasKey $d "two" -}}{{$d.two}}{{- end -}}
|
|
||||||
{{- if hasKey $d "three" -}}{{$d.three}}{{- end -}}
|
|
||||||
`
|
|
||||||
|
|
||||||
expect := "123"
|
|
||||||
if err := runt(tpl, expect); err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestUntil(t *testing.T) {
|
func TestUntil(t *testing.T) {
|
||||||
tests := map[string]string{
|
tests := map[string]string{
|
||||||
`{{range $i, $e := until 5}}{{$i}}{{$e}}{{end}}`: "0011223344",
|
`{{range $i, $e := until 5}}{{$i}}{{$e}}{{end}}`: "0011223344",
|
||||||
@ -599,27 +551,6 @@ func TestUntilStep(t *testing.T) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestBase(t *testing.T) {
|
|
||||||
assert.NoError(t, runt(`{{ base "foo/bar" }}`, "bar"))
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestDir(t *testing.T) {
|
|
||||||
assert.NoError(t, runt(`{{ dir "foo/bar/baz" }}`, "foo/bar"))
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestIsAbs(t *testing.T) {
|
|
||||||
assert.NoError(t, runt(`{{ isAbs "/foo" }}`, "true"))
|
|
||||||
assert.NoError(t, runt(`{{ isAbs "foo" }}`, "false"))
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestClean(t *testing.T) {
|
|
||||||
assert.NoError(t, runt(`{{ clean "/foo/../foo/../bar" }}`, "/bar"))
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestExt(t *testing.T) {
|
|
||||||
assert.NoError(t, runt(`{{ ext "/foo/bar/baz.txt" }}`, ".txt"))
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestDelete(t *testing.T) {
|
func TestDelete(t *testing.T) {
|
||||||
fmap := TxtFuncMap()
|
fmap := TxtFuncMap()
|
||||||
delete(fmap, "split")
|
delete(fmap, "split")
|
||||||
|
762
vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go
generated
vendored
762
vendor/github.com/golang/protobuf/_conformance/conformance_proto/conformance.pb.go
generated
vendored
@ -169,13 +169,6 @@ func (m *ConformanceRequest) GetJsonPayload() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ConformanceRequest) GetRequestedOutputFormat() WireFormat {
|
|
||||||
if m != nil {
|
|
||||||
return m.RequestedOutputFormat
|
|
||||||
}
|
|
||||||
return WireFormat_UNSPECIFIED
|
|
||||||
}
|
|
||||||
|
|
||||||
// XXX_OneofFuncs is for the internal use of the proto package.
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
||||||
func (*ConformanceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
func (*ConformanceRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
||||||
return _ConformanceRequest_OneofMarshaler, _ConformanceRequest_OneofUnmarshaler, _ConformanceRequest_OneofSizer, []interface{}{
|
return _ConformanceRequest_OneofMarshaler, _ConformanceRequest_OneofUnmarshaler, _ConformanceRequest_OneofSizer, []interface{}{
|
||||||
@ -578,22 +571,22 @@ type TestAllTypes struct {
|
|||||||
// (protobuf says names can be any valid C/C++ identifier.)
|
// (protobuf says names can be any valid C/C++ identifier.)
|
||||||
Fieldname1 int32 `protobuf:"varint,401,opt,name=fieldname1" json:"fieldname1,omitempty"`
|
Fieldname1 int32 `protobuf:"varint,401,opt,name=fieldname1" json:"fieldname1,omitempty"`
|
||||||
FieldName2 int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2" json:"field_name2,omitempty"`
|
FieldName2 int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2" json:"field_name2,omitempty"`
|
||||||
XFieldName3 int32 `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3" json:"_field_name3,omitempty"`
|
XFieldName3 int32 `protobuf:"varint,403,opt,name=_field_name3,json=fieldName3" json:"_field_name3,omitempty"`
|
||||||
Field_Name4_ int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4" json:"field__name4_,omitempty"`
|
Field_Name4_ int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4" json:"field__name4_,omitempty"`
|
||||||
Field0Name5 int32 `protobuf:"varint,405,opt,name=field0name5" json:"field0name5,omitempty"`
|
Field0Name5 int32 `protobuf:"varint,405,opt,name=field0name5" json:"field0name5,omitempty"`
|
||||||
Field_0Name6 int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6" json:"field_0_name6,omitempty"`
|
Field_0Name6 int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6" json:"field_0_name6,omitempty"`
|
||||||
FieldName7 int32 `protobuf:"varint,407,opt,name=fieldName7" json:"fieldName7,omitempty"`
|
FieldName7 int32 `protobuf:"varint,407,opt,name=fieldName7" json:"fieldName7,omitempty"`
|
||||||
FieldName8 int32 `protobuf:"varint,408,opt,name=FieldName8" json:"FieldName8,omitempty"`
|
FieldName8 int32 `protobuf:"varint,408,opt,name=FieldName8,json=fieldName8" json:"FieldName8,omitempty"`
|
||||||
Field_Name9 int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9" json:"field_Name9,omitempty"`
|
Field_Name9 int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9" json:"field_Name9,omitempty"`
|
||||||
Field_Name10 int32 `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10" json:"Field_Name10,omitempty"`
|
Field_Name10 int32 `protobuf:"varint,410,opt,name=Field_Name10,json=fieldName10" json:"Field_Name10,omitempty"`
|
||||||
FIELD_NAME11 int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11" json:"FIELD_NAME11,omitempty"`
|
FIELD_NAME11 int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=fIELDNAME11" json:"FIELD_NAME11,omitempty"`
|
||||||
FIELDName12 int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12" json:"FIELD_name12,omitempty"`
|
FIELDName12 int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=fIELDName12" json:"FIELD_name12,omitempty"`
|
||||||
XFieldName13 int32 `protobuf:"varint,413,opt,name=__field_name13,json=FieldName13" json:"__field_name13,omitempty"`
|
XFieldName13 int32 `protobuf:"varint,413,opt,name=__field_name13,json=fieldName13" json:"__field_name13,omitempty"`
|
||||||
X_FieldName14 int32 `protobuf:"varint,414,opt,name=__Field_name14,json=FieldName14" json:"__Field_name14,omitempty"`
|
X_FieldName14 int32 `protobuf:"varint,414,opt,name=__Field_name14,json=fieldName14" json:"__Field_name14,omitempty"`
|
||||||
Field_Name15 int32 `protobuf:"varint,415,opt,name=field__name15,json=fieldName15" json:"field__name15,omitempty"`
|
Field_Name15 int32 `protobuf:"varint,415,opt,name=field__name15,json=fieldName15" json:"field__name15,omitempty"`
|
||||||
Field__Name16 int32 `protobuf:"varint,416,opt,name=field__Name16,json=fieldName16" json:"field__Name16,omitempty"`
|
Field__Name16 int32 `protobuf:"varint,416,opt,name=field__Name16,json=fieldName16" json:"field__Name16,omitempty"`
|
||||||
FieldName17__ int32 `protobuf:"varint,417,opt,name=field_name17__,json=fieldName17" json:"field_name17__,omitempty"`
|
FieldName17__ int32 `protobuf:"varint,417,opt,name=field_name17__,json=fieldName17" json:"field_name17__,omitempty"`
|
||||||
FieldName18__ int32 `protobuf:"varint,418,opt,name=Field_name18__,json=FieldName18" json:"Field_name18__,omitempty"`
|
FieldName18__ int32 `protobuf:"varint,418,opt,name=Field_name18__,json=fieldName18" json:"Field_name18__,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *TestAllTypes) Reset() { *m = TestAllTypes{} }
|
func (m *TestAllTypes) Reset() { *m = TestAllTypes{} }
|
||||||
@ -650,111 +643,6 @@ func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalInt32() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalInt32
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalInt64() int64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalInt64
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalUint32() uint32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalUint32
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalUint64() uint64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalUint64
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalSint32() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalSint32
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalSint64() int64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalSint64
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalFixed32() uint32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalFixed32
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalFixed64() uint64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalFixed64
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalSfixed32() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalSfixed32
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalSfixed64() int64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalSfixed64
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalFloat() float32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalFloat
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalDouble() float64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalDouble
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalBool() bool {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalBool
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalString() string {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalString
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalBytes() []byte {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalBytes
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage {
|
func (m *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.OptionalNestedMessage
|
return m.OptionalNestedMessage
|
||||||
@ -769,34 +657,6 @@ func (m *TestAllTypes) GetOptionalForeignMessage() *ForeignMessage {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalNestedEnum() TestAllTypes_NestedEnum {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalNestedEnum
|
|
||||||
}
|
|
||||||
return TestAllTypes_FOO
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalForeignEnum() ForeignEnum {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalForeignEnum
|
|
||||||
}
|
|
||||||
return ForeignEnum_FOREIGN_FOO
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalStringPiece() string {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalStringPiece
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetOptionalCord() string {
|
|
||||||
if m != nil {
|
|
||||||
return m.OptionalCord
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRecursiveMessage() *TestAllTypes {
|
func (m *TestAllTypes) GetRecursiveMessage() *TestAllTypes {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.RecursiveMessage
|
return m.RecursiveMessage
|
||||||
@ -804,111 +664,6 @@ func (m *TestAllTypes) GetRecursiveMessage() *TestAllTypes {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedInt32() []int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedInt32
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedInt64() []int64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedInt64
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedUint32() []uint32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedUint32
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedUint64() []uint64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedUint64
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedSint32() []int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedSint32
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedSint64() []int64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedSint64
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedFixed32() []uint32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedFixed32
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedFixed64() []uint64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedFixed64
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedSfixed32() []int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedSfixed32
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedSfixed64() []int64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedSfixed64
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedFloat() []float32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedFloat
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedDouble() []float64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedDouble
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedBool() []bool {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedBool
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedString() []string {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedString
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedBytes() [][]byte {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedBytes
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage {
|
func (m *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.RepeatedNestedMessage
|
return m.RepeatedNestedMessage
|
||||||
@ -923,34 +678,6 @@ func (m *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedNestedEnum
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedForeignEnum
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedStringPiece() []string {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedStringPiece
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetRepeatedCord() []string {
|
|
||||||
if m != nil {
|
|
||||||
return m.RepeatedCord
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetMapInt32Int32() map[int32]int32 {
|
func (m *TestAllTypes) GetMapInt32Int32() map[int32]int32 {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.MapInt32Int32
|
return m.MapInt32Int32
|
||||||
@ -1357,132 +1084,6 @@ func (m *TestAllTypes) GetRepeatedValue() []*google_protobuf3.Value {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *TestAllTypes) GetFieldname1() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.Fieldname1
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetFieldName2() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.FieldName2
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetXFieldName3() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.XFieldName3
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetField_Name4_() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.Field_Name4_
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetField0Name5() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.Field0Name5
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetField_0Name6() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.Field_0Name6
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetFieldName7() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.FieldName7
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetFieldName8() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.FieldName8
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetField_Name9() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.Field_Name9
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetField_Name10() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.Field_Name10
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetFIELD_NAME11() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.FIELD_NAME11
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetFIELDName12() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.FIELDName12
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetXFieldName13() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.XFieldName13
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetX_FieldName14() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.X_FieldName14
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetField_Name15() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.Field_Name15
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetField__Name16() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.Field__Name16
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetFieldName17__() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.FieldName17__
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes) GetFieldName18__() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.FieldName18__
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// XXX_OneofFuncs is for the internal use of the proto package.
|
// XXX_OneofFuncs is for the internal use of the proto package.
|
||||||
func (*TestAllTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
func (*TestAllTypes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
|
||||||
return _TestAllTypes_OneofMarshaler, _TestAllTypes_OneofUnmarshaler, _TestAllTypes_OneofSizer, []interface{}{
|
return _TestAllTypes_OneofMarshaler, _TestAllTypes_OneofUnmarshaler, _TestAllTypes_OneofSizer, []interface{}{
|
||||||
@ -1666,13 +1267,6 @@ func (m *TestAllTypes_NestedMessage) String() string { return proto.C
|
|||||||
func (*TestAllTypes_NestedMessage) ProtoMessage() {}
|
func (*TestAllTypes_NestedMessage) ProtoMessage() {}
|
||||||
func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
|
func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2, 0} }
|
||||||
|
|
||||||
func (m *TestAllTypes_NestedMessage) GetA() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.A
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes {
|
func (m *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.Corecursive
|
return m.Corecursive
|
||||||
@ -1689,13 +1283,6 @@ func (m *ForeignMessage) String() string { return proto.CompactTextSt
|
|||||||
func (*ForeignMessage) ProtoMessage() {}
|
func (*ForeignMessage) ProtoMessage() {}
|
||||||
func (*ForeignMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
func (*ForeignMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
||||||
|
|
||||||
func (m *ForeignMessage) GetC() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.C
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*ConformanceRequest)(nil), "conformance.ConformanceRequest")
|
proto.RegisterType((*ConformanceRequest)(nil), "conformance.ConformanceRequest")
|
||||||
proto.RegisterType((*ConformanceResponse)(nil), "conformance.ConformanceResponse")
|
proto.RegisterType((*ConformanceResponse)(nil), "conformance.ConformanceResponse")
|
||||||
@ -1710,177 +1297,176 @@ func init() {
|
|||||||
func init() { proto.RegisterFile("conformance_proto/conformance.proto", fileDescriptor0) }
|
func init() { proto.RegisterFile("conformance_proto/conformance.proto", fileDescriptor0) }
|
||||||
|
|
||||||
var fileDescriptor0 = []byte{
|
var fileDescriptor0 = []byte{
|
||||||
// 2737 bytes of a gzipped FileDescriptorProto
|
// 2731 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x5a, 0xd9, 0x72, 0xdb, 0xc8,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 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x86, 0x57, 0xc0, 0x94, 0x80, 0xf5, 0x28, 0x1d, 0xde, 0xd5, 0x84,
|
0xd9, 0x97, 0xa9, 0xc0, 0x1c, 0x1b, 0x5e, 0x01, 0x53, 0x02, 0xd6, 0xa3, 0x74, 0x78, 0x57, 0x13,
|
||||||
0x2b, 0x56, 0x1f, 0x10, 0x6b, 0x02, 0xe8, 0xd8, 0x64, 0x57, 0xc3, 0x2a, 0x50, 0x63, 0x8c, 0x28,
|
0xae, 0x58, 0xbd, 0x4f, 0xac, 0x09, 0xa0, 0x63, 0x93, 0x5d, 0x0d, 0xab, 0x40, 0x8d, 0x31, 0xa2,
|
||||||
0x23, 0xde, 0xde, 0x74, 0x0c, 0xdc, 0x4f, 0x32, 0x46, 0x94, 0x11, 0xd7, 0x08, 0xaa, 0x40, 0xc7,
|
0x8c, 0x78, 0x7b, 0xd3, 0x31, 0x70, 0x2f, 0xc9, 0x18, 0x51, 0x46, 0x5c, 0x23, 0xa8, 0x02, 0x1d,
|
||||||
0x86, 0x57, 0x41, 0x51, 0x00, 0x8f, 0x1a, 0x9f, 0xf0, 0x0f, 0x37, 0xd6, 0xd1, 0xa8, 0x65, 0x94,
|
0x1b, 0x5e, 0x05, 0x45, 0x01, 0x3c, 0x6a, 0x7c, 0xc2, 0x3f, 0x5c, 0x5f, 0x43, 0xa3, 0x96, 0x51,
|
||||||
0x46, 0x5d, 0x41, 0x50, 0xa5, 0xe6, 0x24, 0xd4, 0xb1, 0xd1, 0x98, 0x65, 0x94, 0x46, 0x34, 0xa8,
|
0x1a, 0x75, 0x05, 0x41, 0x95, 0x9a, 0x93, 0x50, 0xc7, 0x46, 0x63, 0x96, 0x51, 0x1a, 0xd1, 0xa0,
|
||||||
0x63, 0xc3, 0xeb, 0x60, 0x3a, 0x76, 0xcf, 0x69, 0xc7, 0x2d, 0xa3, 0x34, 0xe5, 0x0a, 0x8e, 0x7d,
|
0x8e, 0x0d, 0xaf, 0x83, 0xe9, 0xd8, 0x3d, 0xa7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 0xce, 0xcb, 0x60, 0x32, 0xf4, 0x3b, 0xbe, 0x87, 0xf3,
|
0x99, 0x39, 0x70, 0x8b, 0x62, 0x0d, 0x4f, 0xe7, 0x65, 0x30, 0x19, 0xfa, 0x1d, 0xdf, 0xc3, 0x79,
|
||||||
0x48, 0x6f, 0xe6, 0x0b, 0x96, 0x89, 0xd5, 0x86, 0x5b, 0x85, 0xda, 0xc8, 0x30, 0xc7, 0x46, 0x96,
|
0xa4, 0x37, 0xf3, 0x05, 0xcb, 0xc4, 0x6a, 0xc3, 0xad, 0x42, 0x6d, 0x64, 0x98, 0x63, 0x23, 0xcb,
|
||||||
0x65, 0x62, 0xb5, 0x91, 0x60, 0x54, 0x1b, 0x04, 0x8c, 0xa9, 0xcd, 0x45, 0xcb, 0xc4, 0x6a, 0xc3,
|
0x32, 0xb1, 0xda, 0x48, 0x30, 0xaa, 0x0d, 0x02, 0xc6, 0xd4, 0xe6, 0xa2, 0x65, 0x62, 0xb5, 0xe1,
|
||||||
0xcd, 0xb1, 0xda, 0x28, 0x40, 0xc7, 0x46, 0x4b, 0x96, 0x89, 0xd5, 0x46, 0x06, 0x6a, 0x8c, 0x4c,
|
0xe6, 0x58, 0x6d, 0x14, 0xa0, 0x63, 0xa3, 0x25, 0xcb, 0xc4, 0x6a, 0x23, 0x03, 0x35, 0x46, 0xa6,
|
||||||
0x6d, 0x96, 0x2d, 0x13, 0xab, 0x0d, 0x37, 0xef, 0x27, 0x19, 0x99, 0xda, 0x5c, 0xb2, 0x4c, 0xac,
|
0x36, 0xcb, 0x96, 0x89, 0xd5, 0x86, 0x9b, 0xf7, 0x92, 0x8c, 0x4c, 0x6d, 0x2e, 0x59, 0x26, 0x56,
|
||||||
0x36, 0x32, 0x90, 0xaa, 0x8d, 0x00, 0x72, 0x59, 0xb8, 0x6c, 0x99, 0x58, 0x6d, 0xb8, 0x5d, 0x52,
|
0x1b, 0x19, 0x48, 0xd5, 0x46, 0x00, 0xb9, 0x2c, 0x5c, 0xb6, 0x4c, 0xac, 0x36, 0xdc, 0x2e, 0xa9,
|
||||||
0x1b, 0x15, 0xea, 0xd8, 0xe8, 0xff, 0x2c, 0x13, 0xab, 0x8d, 0x02, 0xa5, 0x6a, 0x13, 0xbb, 0xe7,
|
0x8d, 0x0a, 0x75, 0x6c, 0xf4, 0x7f, 0x96, 0x89, 0xd5, 0x46, 0x81, 0x52, 0xb5, 0x89, 0xdd, 0x73,
|
||||||
0xb4, 0x57, 0x2c, 0x13, 0xab, 0x8d, 0x08, 0x40, 0x52, 0x1b, 0x0d, 0xec, 0xd8, 0xa8, 0x64, 0x99,
|
0xda, 0x2b, 0x96, 0x89, 0xd5, 0x46, 0x04, 0x20, 0xa9, 0x8d, 0x06, 0x76, 0x6c, 0x54, 0xb2, 0x4c,
|
||||||
0x58, 0x6d, 0x54, 0x30, 0x55, 0x9b, 0x38, 0x08, 0xa2, 0x36, 0x57, 0x2d, 0x13, 0xab, 0x8d, 0x08,
|
0xac, 0x36, 0x2a, 0x98, 0xaa, 0x4d, 0x1c, 0x04, 0x51, 0x9b, 0xab, 0x96, 0x89, 0xd5, 0x46, 0x84,
|
||||||
0x81, 0xab, 0x8d, 0x80, 0x31, 0xb5, 0xb9, 0x66, 0x99, 0x58, 0x6d, 0xb8, 0x39, 0x56, 0x1b, 0x01,
|
0xc0, 0xd5, 0x46, 0xc0, 0x98, 0xda, 0x5c, 0xb3, 0x4c, 0xac, 0x36, 0xdc, 0x1c, 0xab, 0x8d, 0x00,
|
||||||
0x24, 0x6a, 0x73, 0xdd, 0x32, 0xb1, 0xda, 0x70, 0x23, 0x57, 0x9b, 0x38, 0x42, 0xaa, 0x36, 0x6f,
|
0x12, 0xb5, 0xb9, 0x6e, 0x99, 0x58, 0x6d, 0xb8, 0x91, 0xab, 0x4d, 0x1c, 0x21, 0x55, 0x9b, 0x37,
|
||||||
0x5a, 0x26, 0x56, 0x1b, 0x11, 0x9f, 0x50, 0x9b, 0x98, 0x8d, 0xa8, 0xcd, 0x5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1, 0x05, 0x00, 0x18, 0x04,
|
0x40, 0xbf, 0xb2, 0xb6, 0x0d, 0xd9, 0x78, 0x03, 0x10, 0x23, 0xed, 0xc2, 0x0b, 0x00, 0x30, 0x08,
|
||||||
0xdf, 0x87, 0x11, 0x7e, 0x10, 0xdd, 0x1e, 0x72, 0xc7, 0x29, 0x02, 0xdf, 0x5b, 0xca, 0x56, 0x1d,
|
0xbe, 0x0f, 0x23, 0xfc, 0x20, 0xba, 0x35, 0xe4, 0x8e, 0x53, 0x04, 0xbe, 0xb7, 0x94, 0xad, 0x3a,
|
||||||
0x1b, 0x75, 0x2d, 0xa3, 0x34, 0xac, 0x6c, 0xd5, 0xb1, 0x63, 0x47, 0x54, 0x7b, 0x7a, 0xf8, 0xf1,
|
0x36, 0xea, 0x5a, 0x46, 0x69, 0x58, 0xd9, 0xaa, 0x63, 0xc7, 0x8e, 0xa8, 0xf6, 0xf4, 0xf0, 0xe3,
|
||||||
0x58, 0x38, 0xa2, 0x62, 0x22, 0x78, 0x98, 0x90, 0xbc, 0xc2, 0x8f, 0xc6, 0x82, 0x87, 0x09, 0x43,
|
0xb1, 0x70, 0x44, 0xc5, 0x44, 0xf0, 0x30, 0x21, 0x79, 0x85, 0x1f, 0x8d, 0x05, 0x0f, 0x13, 0x86,
|
||||||
0x85, 0x47, 0x43, 0xca, 0xf6, 0xe1, 0xe0, 0x8f, 0x78, 0x22, 0x66, 0x52, 0x9e, 0x3d, 0xe9, 0x69,
|
0x0a, 0x8f, 0x86, 0x94, 0xed, 0xc3, 0xc1, 0x1f, 0xf1, 0x44, 0xcc, 0xa4, 0x3c, 0xbb, 0xd2, 0xd3,
|
||||||
0x8c, 0x88, 0x0c, 0x9b, 0xa6, 0xa1, 0x5f, 0x19, 0x24, 0xf7, 0x8b, 0x2b, 0x74, 0xdc, 0xb6, 0xc2,
|
0x18, 0x11, 0x19, 0x36, 0x4d, 0x43, 0xbf, 0x32, 0x48, 0xee, 0x17, 0x57, 0xe8, 0xb8, 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x82, 0x42, 0x2d, 0x86, 0xac,
|
||||||
0xd0, 0x67, 0x19, 0xa4, 0xca, 0x21, 0x1b, 0x70, 0x09, 0x4c, 0x50, 0x04, 0x81, 0xd8, 0x35, 0xf4,
|
0xa3, 0xcf, 0xea, 0x90, 0x75, 0xb8, 0x04, 0x26, 0x28, 0x82, 0x40, 0xec, 0x1a, 0xfa, 0x9c, 0x8e,
|
||||||
0x39, 0x9d, 0x86, 0xfc, 0x3d, 0x49, 0xbe, 0xad, 0x62, 0xc8, 0x4d, 0xf4, 0x79, 0x8a, 0x90, 0x6d,
|
0x21, 0x7f, 0x4f, 0x92, 0x6f, 0x37, 0x31, 0xe4, 0x16, 0xfa, 0x3c, 0x45, 0xc8, 0x36, 0xb8, 0xcc,
|
||||||
0x70, 0x99, 0xd3, 0xac, 0x12, 0x1e, 0x07, 0x7d, 0x41, 0x01, 0x61, 0x1e, 0x47, 0xec, 0x08, 0x7f,
|
0x69, 0x6e, 0x12, 0x1e, 0x07, 0x7d, 0x41, 0x01, 0x61, 0x1e, 0x47, 0xec, 0x08, 0x7f, 0xbb, 0x8d,
|
||||||
0xbb, 0x85, 0xbe, 0xa8, 0x3b, 0xba, 0x85, 0x01, 0x22, 0xb4, 0x4d, 0xf4, 0x25, 0x3d, 0xda, 0xcd,
|
0xbe, 0xa8, 0x3b, 0xba, 0x8d, 0x01, 0x55, 0xfe, 0x6d, 0x03, 0x7d, 0x49, 0x07, 0x6c, 0xc4, 0x5b,
|
||||||
0x78, 0xcb, 0xf8, 0xeb, 0x6d, 0xf4, 0x65, 0x9d, 0xe2, 0x36, 0x5c, 0x02, 0x85, 0xaa, 0x40, 0xac,
|
0xc6, 0x5f, 0xef, 0xa0, 0x2f, 0xeb, 0x88, 0x3b, 0x70, 0x09, 0x14, 0xaa, 0x02, 0xb1, 0x7a, 0x13,
|
||||||
0xad, 0xa2, 0xaf, 0xb0, 0x38, 0x04, 0xc9, 0xda, 0x2a, 0xc1, 0xec, 0x54, 0xde, 0x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|
0x22, 0x9d, 0x43, 0x19, 0x31, 0xca, 0x1c, 0xc3, 0x29, 0x1c, 0xc3, 0x49, 0x8e, 0xc4, 0x28, 0x51,
|
||||||
0xe1, 0x24, 0x47, 0x62, 0x94, 0x28, 0x73, 0x4c, 0xa7, 0x70, 0x4c, 0xa7, 0x73, 0x28, 0x23, 0x43,
|
0xe6, 0x98, 0x4e, 0xe1, 0x98, 0x4e, 0xe7, 0x50, 0x46, 0x86, 0x32, 0x07, 0x4c, 0xe1, 0x80, 0x32,
|
||||||
0x99, 0x03, 0xa6, 0x70, 0x40, 0x99, 0xe3, 0x01, 0x98, 0x4f, 0x1f, 0x0c, 0xca, 0x2c, 0xa3, 0x29,
|
0xc7, 0x43, 0x30, 0x9f, 0x3e, 0x18, 0x94, 0x59, 0x46, 0x53, 0x58, 0x46, 0x33, 0x58, 0xd4, 0xe1,
|
||||||
0x2c, 0xa3, 0x19, 0x2c, 0xea, 0xf0, 0x4f, 0x66, 0x19, 0x49, 0x61, 0x19, 0x91, 0x59, 0xaa, 0x00,
|
0x9f, 0xcc, 0x32, 0x92, 0xc2, 0x32, 0x22, 0xb3, 0x54, 0x01, 0xca, 0x1a, 0xef, 0xc9, 0x3c, 0x53,
|
||||||
0x65, 0x8d, 0xf7, 0x64, 0x9e, 0xa9, 0x14, 0x9e, 0xa9, 0x2c, 0x1e, 0x6d, 0x7c, 0x27, 0xf3, 0x14,
|
0x29, 0x3c, 0x53, 0x59, 0x3c, 0xda, 0xf8, 0x4e, 0xe6, 0x29, 0xa6, 0xf0, 0x14, 0x53, 0xbb, 0x4d,
|
||||||
0x53, 0x78, 0x8a, 0xa9, 0xdd, 0x26, 0x0f, 0xe9, 0x4e, 0xeb, 0xd7, 0x9c, 0xcc, 0xb0, 0x05, 0x66,
|
0x1e, 0xd2, 0x9d, 0xd6, 0xaf, 0x39, 0x99, 0x61, 0x13, 0xcc, 0xa4, 0xcc, 0xe3, 0x4e, 0xa3, 0x30,
|
||||||
0x52, 0xe6,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x0e, 0xc1, 0x02, 0x18, 0x7b, 0xe2, 0xee, 0x3d, 0xdd, 0x2b, 0x1f, 0x54, 0x8b, 0x06,
|
0xf6, 0xd4, 0xdd, 0x7d, 0xb6, 0x5b, 0xde, 0xaf, 0x16, 0x0d, 0x38, 0x06, 0x86, 0x1f, 0xef, 0xed,
|
||||||
0x1c, 0x03, 0xc3, 0x8f, 0xf6, 0xf7, 0x76, 0x8b, 0xb9, 0x6b, 0xf7, 0x40, 0x5e, 0x9e, 0x07, 0x4e,
|
0xee, 0x14, 0x73, 0xd7, 0xee, 0x83, 0xbc, 0x3c, 0x0f, 0x9c, 0x02, 0xf9, 0xea, 0xae, 0x5b, 0xd9,
|
||||||
0x81, 0x7c, 0x75, 0xcf, 0xad, 0xec, 0x3c, 0xdc, 0xad, 0xd1, 0x48, 0x25, 0x03, 0x8d, 0x58, 0x31,
|
0x7e, 0xb4, 0x53, 0xa3, 0x91, 0x4a, 0x06, 0x1a, 0xb1, 0x62, 0x78, 0x51, 0xcc, 0x95, 0x2f, 0x82,
|
||||||
0x3c, 0x2f, 0xe6, 0xca, 0x17, 0xc1, 0x85, 0x7a, 0xd0, 0x4a, 0xfc, 0x61, 0x26, 0x25, 0xe7, 0xc5,
|
0x0b, 0xf5, 0xa0, 0x95, 0xf8, 0xc3, 0x4c, 0x4a, 0xce, 0xc1, 0x08, 0xb1, 0xae, 0xff, 0x2f, 0x00,
|
||||||
0x08, 0xb1, 0x6e, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x33, 0xc2, 0x0c, 0xb6, 0xeb, 0x26, 0x00,
|
0x00, 0xff, 0xff, 0x46, 0x1f, 0xdb, 0xdc, 0xeb, 0x26, 0x00, 0x00,
|
||||||
0x00,
|
|
||||||
}
|
}
|
||||||
|
93
vendor/github.com/golang/protobuf/descriptor/descriptor.go
generated
vendored
93
vendor/github.com/golang/protobuf/descriptor/descriptor.go
generated
vendored
@ -1,93 +0,0 @@
|
|||||||
// Go support for Protocol Buffers - Google's data interchange format
|
|
||||||
//
|
|
||||||
// Copyright 2016 The Go Authors. All rights reserved.
|
|
||||||
// https://github.com/golang/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.
|
|
||||||
// * Neither the name of Google Inc. nor the names of its
|
|
||||||
// contributors may be used to endorse or promote products derived from
|
|
||||||
// this software without specific prior written permission.
|
|
||||||
//
|
|
||||||
// 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 descriptor provides functions for obtaining protocol buffer
|
|
||||||
// descriptors for generated Go types.
|
|
||||||
//
|
|
||||||
// These functions cannot go in package proto because they depend on the
|
|
||||||
// generated protobuf descriptor messages, which themselves depend on proto.
|
|
||||||
package descriptor
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"compress/gzip"
|
|
||||||
"fmt"
|
|
||||||
"io/ioutil"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
|
||||||
protobuf "google.golang.org/genproto/protobuf"
|
|
||||||
)
|
|
||||||
|
|
||||||
// extractFile extracts a FileDescriptorProto from a gzip'd buffer.
|
|
||||||
func extractFile(gz []byte) (*protobuf.FileDescriptorProto, error) {
|
|
||||||
r, err := gzip.NewReader(bytes.NewReader(gz))
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("failed to open gzip reader: %v", err)
|
|
||||||
}
|
|
||||||
defer r.Close()
|
|
||||||
|
|
||||||
b, err := ioutil.ReadAll(r)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("failed to uncompress descriptor: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
fd := new(protobuf.FileDescriptorProto)
|
|
||||||
if err := proto.Unmarshal(b, fd); err != nil {
|
|
||||||
return nil, fmt.Errorf("malformed FileDescriptorProto: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return fd, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Message is a proto.Message with a method to return its descriptor.
|
|
||||||
//
|
|
||||||
// Message types generated by the protocol compiler always satisfy
|
|
||||||
// the Message interface.
|
|
||||||
type Message interface {
|
|
||||||
proto.Message
|
|
||||||
Descriptor() ([]byte, []int)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ForMessage returns a FileDescriptorProto and a DescriptorProto from within it
|
|
||||||
// describing the given message.
|
|
||||||
func ForMessage(msg Message) (fd *protobuf.FileDescriptorProto, md *protobuf.DescriptorProto) {
|
|
||||||
gz, path := msg.Descriptor()
|
|
||||||
fd, err := extractFile(gz)
|
|
||||||
if err != nil {
|
|
||||||
panic(fmt.Sprintf("invalid FileDescriptorProto for %T: %v", msg, err))
|
|
||||||
}
|
|
||||||
|
|
||||||
md = fd.MessageType[path[0]]
|
|
||||||
for _, i := range path[1:] {
|
|
||||||
md = md.NestedType[i]
|
|
||||||
}
|
|
||||||
return fd, md
|
|
||||||
}
|
|
32
vendor/github.com/golang/protobuf/descriptor/descriptor_test.go
generated
vendored
32
vendor/github.com/golang/protobuf/descriptor/descriptor_test.go
generated
vendored
@ -1,32 +0,0 @@
|
|||||||
package descriptor_test
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/descriptor"
|
|
||||||
tpb "github.com/golang/protobuf/proto/testdata"
|
|
||||||
protobuf "google.golang.org/genproto/protobuf"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestMessage(t *testing.T) {
|
|
||||||
var msg *protobuf.DescriptorProto
|
|
||||||
fd, md := descriptor.ForMessage(msg)
|
|
||||||
if pkg, want := fd.GetPackage(), "google.protobuf"; pkg != want {
|
|
||||||
t.Errorf("descriptor.ForMessage(%T).GetPackage() = %q; want %q", msg, pkg, want)
|
|
||||||
}
|
|
||||||
if name, want := md.GetName(), "DescriptorProto"; name != want {
|
|
||||||
t.Fatalf("descriptor.ForMessage(%T).GetName() = %q; want %q", msg, name, want)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func Example_Options() {
|
|
||||||
var msg *tpb.MyMessageSet
|
|
||||||
_, md := descriptor.ForMessage(msg)
|
|
||||||
if md.GetOptions().GetMessageSetWireFormat() {
|
|
||||||
fmt.Printf("%v uses option message_set_wire_format.\n", md.GetName())
|
|
||||||
}
|
|
||||||
|
|
||||||
// Output:
|
|
||||||
// MyMessageSet uses option message_set_wire_format.
|
|
||||||
}
|
|
18
vendor/github.com/golang/protobuf/jsonpb/jsonpb.go
generated
vendored
18
vendor/github.com/golang/protobuf/jsonpb/jsonpb.go
generated
vendored
@ -585,14 +585,7 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe
|
|||||||
case "Any":
|
case "Any":
|
||||||
return fmt.Errorf("unmarshaling Any not supported yet")
|
return fmt.Errorf("unmarshaling Any not supported yet")
|
||||||
case "Duration":
|
case "Duration":
|
||||||
ivStr := string(inputValue)
|
unq, err := strconv.Unquote(string(inputValue))
|
||||||
if ivStr == "null" {
|
|
||||||
target.Field(0).SetInt(0)
|
|
||||||
target.Field(1).SetInt(0)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
unq, err := strconv.Unquote(ivStr)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -607,14 +600,7 @@ func (u *Unmarshaler) unmarshalValue(target reflect.Value, inputValue json.RawMe
|
|||||||
target.Field(1).SetInt(ns)
|
target.Field(1).SetInt(ns)
|
||||||
return nil
|
return nil
|
||||||
case "Timestamp":
|
case "Timestamp":
|
||||||
ivStr := string(inputValue)
|
unq, err := strconv.Unquote(string(inputValue))
|
||||||
if ivStr == "null" {
|
|
||||||
target.Field(0).SetInt(0)
|
|
||||||
target.Field(1).SetInt(0)
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
unq, err := strconv.Unquote(ivStr)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
2
vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go
generated
vendored
2
vendor/github.com/golang/protobuf/jsonpb/jsonpb_test.go
generated
vendored
@ -467,11 +467,9 @@ var unmarshalingTests = []struct {
|
|||||||
{"camelName input", Unmarshaler{}, `{"oBool":true}`, &pb.Simple{OBool: proto.Bool(true)}},
|
{"camelName input", Unmarshaler{}, `{"oBool":true}`, &pb.Simple{OBool: proto.Bool(true)}},
|
||||||
|
|
||||||
{"Duration", Unmarshaler{}, `{"dur":"3.000s"}`, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}},
|
{"Duration", Unmarshaler{}, `{"dur":"3.000s"}`, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}},
|
||||||
{"null Duration", Unmarshaler{}, `{"dur":null}`, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 0}}},
|
|
||||||
{"Timestamp", Unmarshaler{}, `{"ts":"2014-05-13T16:53:20.021Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 14e8, Nanos: 21e6}}},
|
{"Timestamp", Unmarshaler{}, `{"ts":"2014-05-13T16:53:20.021Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 14e8, Nanos: 21e6}}},
|
||||||
{"PreEpochTimestamp", Unmarshaler{}, `{"ts":"1969-12-31T23:59:58.999999995Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: -2, Nanos: 999999995}}},
|
{"PreEpochTimestamp", Unmarshaler{}, `{"ts":"1969-12-31T23:59:58.999999995Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: -2, Nanos: 999999995}}},
|
||||||
{"ZeroTimeTimestamp", Unmarshaler{}, `{"ts":"0001-01-01T00:00:00Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: -62135596800, Nanos: 0}}},
|
{"ZeroTimeTimestamp", Unmarshaler{}, `{"ts":"0001-01-01T00:00:00Z"}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: -62135596800, Nanos: 0}}},
|
||||||
{"null Timestamp", Unmarshaler{}, `{"ts":null}`, &pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 0, Nanos: 0}}},
|
|
||||||
|
|
||||||
{"DoubleValue", Unmarshaler{}, `{"dbl":1.2}`, &pb.KnownTypes{Dbl: &wpb.DoubleValue{Value: 1.2}}},
|
{"DoubleValue", Unmarshaler{}, `{"dbl":1.2}`, &pb.KnownTypes{Dbl: &wpb.DoubleValue{Value: 1.2}}},
|
||||||
{"FloatValue", Unmarshaler{}, `{"flt":1.2}`, &pb.KnownTypes{Flt: &wpb.FloatValue{Value: 1.2}}},
|
{"FloatValue", Unmarshaler{}, `{"flt":1.2}`, &pb.KnownTypes{Flt: &wpb.FloatValue{Value: 1.2}}},
|
||||||
|
7
vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go
generated
vendored
7
vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/more_test_objects.pb.go
generated
vendored
@ -71,13 +71,6 @@ func (m *Simple3) String() string { return proto.CompactTextString(m)
|
|||||||
func (*Simple3) ProtoMessage() {}
|
func (*Simple3) ProtoMessage() {}
|
||||||
func (*Simple3) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
func (*Simple3) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
||||||
|
|
||||||
func (m *Simple3) GetDub() float64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.Dub
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
type Mappy struct {
|
type Mappy struct {
|
||||||
Nummy map[int64]int32 `protobuf:"bytes,1,rep,name=nummy" json:"nummy,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
|
Nummy map[int64]int32 `protobuf:"bytes,1,rep,name=nummy" json:"nummy,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
|
||||||
Strry map[string]string `protobuf:"bytes,2,rep,name=strry" json:"strry,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
Strry map[string]string `protobuf:"bytes,2,rep,name=strry" json:"strry,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||||
|
138
vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go
generated
vendored
138
vendor/github.com/golang/protobuf/jsonpb/jsonpb_test_proto/test_objects.pb.go
generated
vendored
@ -360,7 +360,7 @@ type MsgWithOneof_Salary struct {
|
|||||||
Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"`
|
Salary int64 `protobuf:"varint,2,opt,name=salary,oneof"`
|
||||||
}
|
}
|
||||||
type MsgWithOneof_Country struct {
|
type MsgWithOneof_Country struct {
|
||||||
Country string `protobuf:"bytes,3,opt,name=Country,oneof"`
|
Country string `protobuf:"bytes,3,opt,name=Country,json=country,oneof"`
|
||||||
}
|
}
|
||||||
type MsgWithOneof_HomeAddress struct {
|
type MsgWithOneof_HomeAddress struct {
|
||||||
HomeAddress string `protobuf:"bytes,4,opt,name=home_address,json=homeAddress,oneof"`
|
HomeAddress string `protobuf:"bytes,4,opt,name=home_address,json=homeAddress,oneof"`
|
||||||
@ -559,7 +559,6 @@ var E_Complex_RealExtension = &proto.ExtensionDesc{
|
|||||||
Field: 123,
|
Field: 123,
|
||||||
Name: "jsonpb.Complex.real_extension",
|
Name: "jsonpb.Complex.real_extension",
|
||||||
Tag: "bytes,123,opt,name=real_extension,json=realExtension",
|
Tag: "bytes,123,opt,name=real_extension,json=realExtension",
|
||||||
Filename: "test_objects.proto",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type KnownTypes struct {
|
type KnownTypes struct {
|
||||||
@ -681,7 +680,6 @@ var E_Name = &proto.ExtensionDesc{
|
|||||||
Field: 124,
|
Field: 124,
|
||||||
Name: "jsonpb.name",
|
Name: "jsonpb.name",
|
||||||
Tag: "bytes,124,opt,name=name",
|
Tag: "bytes,124,opt,name=name",
|
||||||
Filename: "test_objects.proto",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -701,71 +699,71 @@ func init() {
|
|||||||
func init() { proto.RegisterFile("test_objects.proto", fileDescriptor1) }
|
func init() { proto.RegisterFile("test_objects.proto", fileDescriptor1) }
|
||||||
|
|
||||||
var fileDescriptor1 = []byte{
|
var fileDescriptor1 = []byte{
|
||||||
// 1054 bytes of a gzipped FileDescriptorProto
|
// 1055 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x95, 0xdf, 0x72, 0xdb, 0x44,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x95, 0x51, 0x73, 0xdb, 0x44,
|
||||||
0x14, 0xc6, 0x23, 0xc9, 0x96, 0xed, 0x75, 0x12, 0xcc, 0x4e, 0x4a, 0x15, 0x13, 0x40, 0x63, 0x4a,
|
0x10, 0xc7, 0x23, 0xc9, 0x96, 0xec, 0x73, 0x12, 0xcc, 0x4d, 0x4a, 0x15, 0x13, 0x40, 0x63, 0x4a,
|
||||||
0x11, 0x85, 0xba, 0x83, 0xe2, 0xf1, 0x30, 0x85, 0x9b, 0xa4, 0x31, 0x94, 0x81, 0x94, 0x99, 0x4d,
|
0x11, 0x85, 0xba, 0x83, 0xe2, 0xf1, 0x30, 0x85, 0x97, 0xa4, 0x31, 0x94, 0x81, 0x94, 0x99, 0x4b,
|
||||||
0x43, 0x2f, 0x3d, 0x72, 0xbc, 0x71, 0x55, 0x64, 0xad, 0x67, 0x77, 0x45, 0xea, 0x81, 0x8b, 0x5c,
|
0x43, 0x1f, 0x3d, 0x72, 0x7c, 0x71, 0x55, 0x64, 0x9d, 0xe7, 0xee, 0x44, 0xea, 0x81, 0x87, 0x3c,
|
||||||
0x73, 0xcd, 0x2b, 0xc0, 0x23, 0xf0, 0x44, 0x3c, 0x48, 0xe7, 0x9c, 0xd5, 0x9f, 0xc4, 0x8e, 0xaf,
|
0xf3, 0xcc, 0x57, 0x80, 0x8f, 0xc0, 0x27, 0xe2, 0x83, 0x74, 0x76, 0x4f, 0xb2, 0x12, 0x3b, 0x7e,
|
||||||
0xe2, 0xb3, 0xe7, 0x3b, 0x5f, 0x56, 0xbf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x0e, 0xbb, 0xff, 0xd8, 0xc4, 0x3d, 0x4b, 0x66, 0xf3, 0x94, 0xd3,
|
||||||
0xf7, 0x88, 0x2b, 0xc6, 0x13, 0x21, 0x12, 0xcf, 0xf2, 0xad, 0xa0, 0xc9, 0xea, 0xe2, 0x58, 0x88,
|
0x7b, 0xc4, 0x15, 0xa3, 0xb1, 0x10, 0xa9, 0x6f, 0x05, 0x56, 0xd8, 0x60, 0x75, 0x71, 0x2c, 0x44,
|
||||||
0x84, 0xde, 0x27, 0x0d, 0x31, 0x8e, 0x53, 0x7d, 0x18, 0x7a, 0xb6, 0x6f, 0x05, 0x75, 0xe6, 0x8a,
|
0x4a, 0xef, 0x13, 0x4f, 0x8c, 0x92, 0x4c, 0x1f, 0x46, 0xbe, 0x1d, 0x58, 0x61, 0x9d, 0xb9, 0xe2,
|
||||||
0x1f, 0x21, 0x2a, 0x13, 0xc3, 0x81, 0xe7, 0xf8, 0x56, 0xe0, 0x98, 0xc4, 0x70, 0x40, 0xf7, 0x49,
|
0x47, 0x88, 0x96, 0x89, 0x41, 0xdf, 0x77, 0x02, 0x2b, 0x74, 0x4c, 0x62, 0xd0, 0xa7, 0xfb, 0xa4,
|
||||||
0x53, 0x8c, 0x33, 0x53, 0x52, 0xf3, 0xad, 0x60, 0x87, 0x35, 0xc4, 0x39, 0x86, 0x55, 0x6a, 0x38,
|
0x21, 0x46, 0xb9, 0x29, 0xa9, 0x05, 0x56, 0xb8, 0xc3, 0x3c, 0x71, 0x8e, 0x61, 0x95, 0x1a, 0xf4,
|
||||||
0xf0, 0xea, 0xbe, 0x15, 0xd4, 0xf2, 0x54, 0x51, 0xa5, 0x4c, 0x95, 0xeb, 0x5b, 0xc1, 0xfb, 0xac,
|
0xfd, 0x7a, 0x60, 0x85, 0xb5, 0x22, 0x55, 0x56, 0x29, 0x53, 0xe5, 0x06, 0x56, 0xf8, 0x3e, 0xf3,
|
||||||
0x21, 0xce, 0x6e, 0x54, 0x29, 0x53, 0xd5, 0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, 0x09, 0xca, 0x01, 0x50, 0x72, 0x09, 0x4a,
|
||||||
0x64, 0x09, 0xca, 0x01, 0x50, 0xb2, 0x04, 0x25, 0x2b, 0x50, 0x0e, 0x80, 0x92, 0x15, 0x28, 0x59,
|
0x2e, 0x41, 0x39, 0x00, 0x4a, 0x2e, 0x41, 0xc9, 0x0a, 0x94, 0x03, 0xa0, 0x64, 0x05, 0x4a, 0x56,
|
||||||
0x81, 0x72, 0x00, 0x94, 0xac, 0x40, 0xc9, 0x0a, 0x94, 0x03, 0xa0, 0xe4, 0xd9, 0x8d, 0xaa, 0x12,
|
0xa0, 0x1c, 0x00, 0x25, 0x2b, 0x50, 0xb2, 0x02, 0xe5, 0x00, 0x28, 0x79, 0x76, 0xa3, 0x6a, 0x09,
|
||||||
0x94, 0x03, 0xa0, 0x64, 0x05, 0x4a, 0x96, 0xa0, 0x1c, 0x00, 0x25, 0x4b, 0x50, 0xb2, 0x02, 0xe5,
|
0xca, 0x01, 0x50, 0xb2, 0x02, 0x25, 0x97, 0xa0, 0x1c, 0x00, 0x25, 0x97, 0xa0, 0x64, 0x05, 0xca,
|
||||||
0x00, 0x28, 0x59, 0x81, 0x92, 0x15, 0x28, 0x07, 0x40, 0xc9, 0x0a, 0x94, 0x2c, 0x41, 0x39, 0x00,
|
0x01, 0x50, 0xb2, 0x02, 0x25, 0x2b, 0x50, 0x0e, 0x80, 0x92, 0x15, 0x28, 0xb9, 0x04, 0xe5, 0x00,
|
||||||
0x4a, 0x1a, 0x50, 0xff, 0xd9, 0xc4, 0x7d, 0x15, 0x4f, 0x67, 0x5c, 0xd3, 0x47, 0xa4, 0x7e, 0x21,
|
0x28, 0x69, 0x40, 0xfd, 0x67, 0x13, 0xf7, 0x55, 0x32, 0x99, 0x72, 0x4d, 0x1f, 0x91, 0xfa, 0x85,
|
||||||
0x12, 0x21, 0xb1, 0x9f, 0x76, 0xc3, 0xbd, 0xbe, 0xb9, 0x0d, 0x7d, 0x93, 0xee, 0x3f, 0x83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0e, 0x09, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
11
vendor/github.com/golang/protobuf/proto/encode.go
generated
vendored
11
vendor/github.com/golang/protobuf/proto/encode.go
generated
vendored
@ -1075,17 +1075,10 @@ func (o *Buffer) enc_map(p *Properties, base structPointer) error {
|
|||||||
|
|
||||||
func (o *Buffer) enc_exts(p *Properties, base structPointer) error {
|
func (o *Buffer) enc_exts(p *Properties, base structPointer) error {
|
||||||
exts := structPointer_Extensions(base, p.field)
|
exts := structPointer_Extensions(base, p.field)
|
||||||
|
if err := encodeExtensions(exts); err != nil {
|
||||||
v, mu := exts.extensionsRead()
|
|
||||||
if v == nil {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
mu.Lock()
|
|
||||||
defer mu.Unlock()
|
|
||||||
if err := encodeExtensionsMap(v); err != nil {
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
v, _ := exts.extensionsRead()
|
||||||
|
|
||||||
return o.enc_map_body(v)
|
return o.enc_map_body(v)
|
||||||
}
|
}
|
||||||
|
1
vendor/github.com/golang/protobuf/proto/extensions.go
generated
vendored
1
vendor/github.com/golang/protobuf/proto/extensions.go
generated
vendored
@ -154,7 +154,6 @@ type ExtensionDesc struct {
|
|||||||
Field int32 // field number
|
Field int32 // field number
|
||||||
Name string // fully-qualified name of extension, for text formatting
|
Name string // fully-qualified name of extension, for text formatting
|
||||||
Tag string // protobuf tag style
|
Tag string // protobuf tag style
|
||||||
Filename string // name of the file in which the extension is defined
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (ed *ExtensionDesc) repeated() bool {
|
func (ed *ExtensionDesc) repeated() bool {
|
||||||
|
28
vendor/github.com/golang/protobuf/proto/extensions_test.go
generated
vendored
28
vendor/github.com/golang/protobuf/proto/extensions_test.go
generated
vendored
@ -40,7 +40,6 @@ import (
|
|||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
pb "github.com/golang/protobuf/proto/testdata"
|
pb "github.com/golang/protobuf/proto/testdata"
|
||||||
"golang.org/x/sync/errgroup"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetExtensionsWithMissingExtensions(t *testing.T) {
|
func TestGetExtensionsWithMissingExtensions(t *testing.T) {
|
||||||
@ -507,30 +506,3 @@ func TestClearAllExtensions(t *testing.T) {
|
|||||||
t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m))
|
t.Errorf("proto.HasExtension(%s): got true, want false", proto.MarshalTextString(m))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMarshalRace(t *testing.T) {
|
|
||||||
// unregistered extension
|
|
||||||
desc := &proto.ExtensionDesc{
|
|
||||||
ExtendedType: (*pb.MyMessage)(nil),
|
|
||||||
ExtensionType: (*bool)(nil),
|
|
||||||
Field: 101010100,
|
|
||||||
Name: "emptyextension",
|
|
||||||
Tag: "varint,0,opt",
|
|
||||||
}
|
|
||||||
|
|
||||||
m := &pb.MyMessage{Count: proto.Int32(4)}
|
|
||||||
if err := proto.SetExtension(m, desc, proto.Bool(true)); err != nil {
|
|
||||||
t.Errorf("proto.SetExtension(m, desc, true): got error %q, want nil", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
var g errgroup.Group
|
|
||||||
for n := 3; n > 0; n-- {
|
|
||||||
g.Go(func() error {
|
|
||||||
_, err := proto.Marshal(m)
|
|
||||||
return err
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if err := g.Wait(); err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
46
vendor/github.com/golang/protobuf/proto/map_test.go
generated
vendored
46
vendor/github.com/golang/protobuf/proto/map_test.go
generated
vendored
@ -1,46 +0,0 @@
|
|||||||
package proto_test
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
|
||||||
ppb "github.com/golang/protobuf/proto/proto3_proto"
|
|
||||||
)
|
|
||||||
|
|
||||||
func marshalled() []byte {
|
|
||||||
m := &ppb.IntMaps{}
|
|
||||||
for i := 0; i < 1000; i++ {
|
|
||||||
m.Maps = append(m.Maps, &ppb.IntMap{
|
|
||||||
Rtt: map[int32]int32{1: 2},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
b, err := proto.Marshal(m)
|
|
||||||
if err != nil {
|
|
||||||
panic(fmt.Sprintf("Can't marshal %+v: %v", m, err))
|
|
||||||
}
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
|
|
||||||
func BenchmarkConcurrentMapUnmarshal(b *testing.B) {
|
|
||||||
in := marshalled()
|
|
||||||
b.RunParallel(func(pb *testing.PB) {
|
|
||||||
for pb.Next() {
|
|
||||||
var out ppb.IntMaps
|
|
||||||
if err := proto.Unmarshal(in, &out); err != nil {
|
|
||||||
b.Errorf("Can't unmarshal ppb.IntMaps: %v", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func BenchmarkSequentialMapUnmarshal(b *testing.B) {
|
|
||||||
in := marshalled()
|
|
||||||
b.ResetTimer()
|
|
||||||
for i := 0; i < b.N; i++ {
|
|
||||||
var out ppb.IntMaps
|
|
||||||
if err := proto.Unmarshal(in, &out); err != nil {
|
|
||||||
b.Errorf("Can't unmarshal ppb.IntMaps: %v", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
222
vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go
generated
vendored
222
vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.pb.go
generated
vendored
@ -12,8 +12,6 @@ It has these top-level messages:
|
|||||||
Message
|
Message
|
||||||
Nested
|
Nested
|
||||||
MessageWithMap
|
MessageWithMap
|
||||||
IntMap
|
|
||||||
IntMaps
|
|
||||||
*/
|
*/
|
||||||
package proto3_proto
|
package proto3_proto
|
||||||
|
|
||||||
@ -30,9 +28,7 @@ var _ = math.Inf
|
|||||||
|
|
||||||
// This is a compile-time assertion to ensure that this generated file
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
// is compatible with the proto package it is being compiled against.
|
// is compatible with the proto package it is being compiled against.
|
||||||
// A compilation error at this line likely means your copy of the
|
const _ = proto.ProtoPackageIsVersion1
|
||||||
// proto package needs to be updated.
|
|
||||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
||||||
|
|
||||||
type Message_Humour int32
|
type Message_Humour int32
|
||||||
|
|
||||||
@ -69,10 +65,10 @@ type Message struct {
|
|||||||
ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount" json:"result_count,omitempty"`
|
ResultCount int64 `protobuf:"varint,7,opt,name=result_count,json=resultCount" json:"result_count,omitempty"`
|
||||||
TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman" json:"true_scotsman,omitempty"`
|
TrueScotsman bool `protobuf:"varint,8,opt,name=true_scotsman,json=trueScotsman" json:"true_scotsman,omitempty"`
|
||||||
Score float32 `protobuf:"fixed32,9,opt,name=score" json:"score,omitempty"`
|
Score float32 `protobuf:"fixed32,9,opt,name=score" json:"score,omitempty"`
|
||||||
Key []uint64 `protobuf:"varint,5,rep,packed,name=key" json:"key,omitempty"`
|
Key []uint64 `protobuf:"varint,5,rep,name=key" json:"key,omitempty"`
|
||||||
ShortKey []int32 `protobuf:"varint,19,rep,packed,name=short_key,json=shortKey" json:"short_key,omitempty"`
|
ShortKey []int32 `protobuf:"varint,19,rep,name=short_key,json=shortKey" json:"short_key,omitempty"`
|
||||||
Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"`
|
Nested *Nested `protobuf:"bytes,6,opt,name=nested" json:"nested,omitempty"`
|
||||||
RFunny []Message_Humour `protobuf:"varint,16,rep,packed,name=r_funny,json=rFunny,enum=proto3_proto.Message_Humour" json:"r_funny,omitempty"`
|
RFunny []Message_Humour `protobuf:"varint,16,rep,name=r_funny,json=rFunny,enum=proto3_proto.Message_Humour" json:"r_funny,omitempty"`
|
||||||
Terrain map[string]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
Terrain map[string]*Nested `protobuf:"bytes,10,rep,name=terrain" json:"terrain,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||||
Proto2Field *testdata.SubDefaults `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"`
|
Proto2Field *testdata.SubDefaults `protobuf:"bytes,11,opt,name=proto2_field,json=proto2Field" json:"proto2_field,omitempty"`
|
||||||
Proto2Value map[string]*testdata.SubDefaults `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
Proto2Value map[string]*testdata.SubDefaults `protobuf:"bytes,13,rep,name=proto2_value,json=proto2Value" json:"proto2_value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
||||||
@ -87,69 +83,6 @@ func (m *Message) String() string { return proto.CompactTextString(m)
|
|||||||
func (*Message) ProtoMessage() {}
|
func (*Message) ProtoMessage() {}
|
||||||
func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
|
||||||
|
|
||||||
func (m *Message) GetName() string {
|
|
||||||
if m != nil {
|
|
||||||
return m.Name
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Message) GetHilarity() Message_Humour {
|
|
||||||
if m != nil {
|
|
||||||
return m.Hilarity
|
|
||||||
}
|
|
||||||
return Message_UNKNOWN
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Message) GetHeightInCm() uint32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.HeightInCm
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Message) GetData() []byte {
|
|
||||||
if m != nil {
|
|
||||||
return m.Data
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Message) GetResultCount() int64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.ResultCount
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Message) GetTrueScotsman() bool {
|
|
||||||
if m != nil {
|
|
||||||
return m.TrueScotsman
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Message) GetScore() float32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.Score
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Message) GetKey() []uint64 {
|
|
||||||
if m != nil {
|
|
||||||
return m.Key
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Message) GetShortKey() []int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.ShortKey
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Message) GetNested() *Nested {
|
func (m *Message) GetNested() *Nested {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.Nested
|
return m.Nested
|
||||||
@ -157,13 +90,6 @@ func (m *Message) GetNested() *Nested {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Message) GetRFunny() []Message_Humour {
|
|
||||||
if m != nil {
|
|
||||||
return m.RFunny
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Message) GetTerrain() map[string]*Nested {
|
func (m *Message) GetTerrain() map[string]*Nested {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.Terrain
|
return m.Terrain
|
||||||
@ -223,20 +149,6 @@ func (m *Nested) String() string { return proto.CompactTextString(m)
|
|||||||
func (*Nested) ProtoMessage() {}
|
func (*Nested) ProtoMessage() {}
|
||||||
func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
func (*Nested) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
|
||||||
|
|
||||||
func (m *Nested) GetBunny() string {
|
|
||||||
if m != nil {
|
|
||||||
return m.Bunny
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Nested) GetCute() bool {
|
|
||||||
if m != nil {
|
|
||||||
return m.Cute
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
type MessageWithMap struct {
|
type MessageWithMap struct {
|
||||||
ByteMapping map[bool][]byte `protobuf:"bytes,1,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
ByteMapping map[bool][]byte `protobuf:"bytes,1,rep,name=byte_mapping,json=byteMapping" json:"byte_mapping,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
}
|
}
|
||||||
@ -253,95 +165,55 @@ func (m *MessageWithMap) GetByteMapping() map[bool][]byte {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type IntMap struct {
|
|
||||||
Rtt map[int32]int32 `protobuf:"bytes,1,rep,name=rtt" json:"rtt,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *IntMap) Reset() { *m = IntMap{} }
|
|
||||||
func (m *IntMap) String() string { return proto.CompactTextString(m) }
|
|
||||||
func (*IntMap) ProtoMessage() {}
|
|
||||||
func (*IntMap) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
|
|
||||||
|
|
||||||
func (m *IntMap) GetRtt() map[int32]int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.Rtt
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
type IntMaps struct {
|
|
||||||
Maps []*IntMap `protobuf:"bytes,1,rep,name=maps" json:"maps,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *IntMaps) Reset() { *m = IntMaps{} }
|
|
||||||
func (m *IntMaps) String() string { return proto.CompactTextString(m) }
|
|
||||||
func (*IntMaps) ProtoMessage() {}
|
|
||||||
func (*IntMaps) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
|
|
||||||
|
|
||||||
func (m *IntMaps) GetMaps() []*IntMap {
|
|
||||||
if m != nil {
|
|
||||||
return m.Maps
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*Message)(nil), "proto3_proto.Message")
|
proto.RegisterType((*Message)(nil), "proto3_proto.Message")
|
||||||
proto.RegisterType((*Nested)(nil), "proto3_proto.Nested")
|
proto.RegisterType((*Nested)(nil), "proto3_proto.Nested")
|
||||||
proto.RegisterType((*MessageWithMap)(nil), "proto3_proto.MessageWithMap")
|
proto.RegisterType((*MessageWithMap)(nil), "proto3_proto.MessageWithMap")
|
||||||
proto.RegisterType((*IntMap)(nil), "proto3_proto.IntMap")
|
|
||||||
proto.RegisterType((*IntMaps)(nil), "proto3_proto.IntMaps")
|
|
||||||
proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value)
|
proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value)
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { proto.RegisterFile("proto3_proto/proto3.proto", fileDescriptor0) }
|
|
||||||
|
|
||||||
var fileDescriptor0 = []byte{
|
var fileDescriptor0 = []byte{
|
||||||
// 733 bytes of a gzipped FileDescriptorProto
|
// 669 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b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09, 0xba, 0x00, 0x75, 0xff, 0x43, 0x7f, 0x15, 0xd2, 0xed, 0x12, 0x9b, 0xd2,
|
0xfd, 0x77, 0xdd, 0x69, 0x40, 0x17, 0x13, 0x6c, 0xaa, 0x41, 0xff, 0x73, 0x56, 0x77, 0xed, 0x8c,
|
||||||
0xe8, 0x27, 0xde, 0xfe, 0xae, 0xbd, 0x59, 0x36, 0xff, 0x8d, 0xae, 0x82, 0x6c, 0xcb, 0x53, 0x62,
|
0x52, 0xff, 0x13, 0x9d, 0x7a, 0xc2, 0xbd, 0x84, 0x98, 0x9a, 0x7a, 0x2e, 0x99, 0xa8, 0xb7, 0x56,
|
||||||
0x2a, 0xea, 0xad, 0x60, 0xa2, 0xd1, 0xa1, 0xf2, 0xdf, 0x60, 0x9b, 0x51, 0xdc, 0x91, 0xe2, 0x5f,
|
0xfe, 0xf0, 0x16, 0x29, 0xc5, 0x2d, 0xd5, 0xfc, 0xe9, 0xe6, 0xe6, 0x43, 0xc5, 0xfc, 0x2a, 0x89,
|
||||||
0x55, 0x8b, 0x4f, 0x25, 0xf3, 0x4f, 0x41, 0x54, 0x06, 0x8a, 0x56, 0x12, 0x41, 0xdf, 0x83, 0x11,
|
0x7a, 0x80, 0xfc, 0x28, 0x85, 0xa0, 0x57, 0x60, 0x88, 0x98, 0xf1, 0x79, 0xc0, 0x66, 0x78, 0x2b,
|
||||||
0xb0, 0x9c, 0x6f, 0x42, 0xb6, 0xc6, 0x47, 0x45, 0x52, 0x6a, 0x0e, 0xbd, 0xfd, 0x1c, 0x7a, 0x97,
|
0x77, 0x4a, 0xe7, 0xd0, 0x59, 0xe5, 0xd0, 0x39, 0x66, 0x19, 0x59, 0xb3, 0x84, 0x57, 0xa6, 0xb8,
|
||||||
0x2c, 0x27, 0x07, 0x16, 0x3a, 0x07, 0x33, 0x0a, 0x58, 0xee, 0xcb, 0x5d, 0x8a, 0x8f, 0xa5, 0x76,
|
0xa5, 0xcc, 0x55, 0xbb, 0x04, 0x6f, 0xab, 0xde, 0x9b, 0x45, 0x20, 0x89, 0x57, 0x8a, 0x27, 0x64,
|
||||||
0x75, 0x11, 0x08, 0xe2, 0x83, 0xe4, 0xa1, 0x73, 0x80, 0x34, 0x9b, 0x47, 0xca, 0x14, 0xfe, 0xb8,
|
0x90, 0xa4, 0x7e, 0xa8, 0x87, 0xc2, 0xff, 0xe6, 0xff, 0xba, 0x69, 0x62, 0x52, 0x20, 0xa2, 0xd7,
|
||||||
0xf8, 0xd7, 0x2a, 0xc7, 0xa4, 0x44, 0x44, 0x3f, 0x80, 0xb1, 0xd8, 0x84, 0xdb, 0x65, 0x42, 0x19,
|
0x60, 0x8c, 0x45, 0x2e, 0x27, 0x31, 0x65, 0x18, 0xa9, 0x56, 0x0f, 0x88, 0xd6, 0xb4, 0xf6, 0x10,
|
||||||
0x46, 0x52, 0xea, 0x8d, 0xa2, 0x03, 0xad, 0x37, 0x05, 0xab, 0x1c, 0xf8, 0x7e, 0x72, 0xd4, 0xd3,
|
0xac, 0xa2, 0xe1, 0xab, 0xe4, 0xe8, 0xa7, 0xa1, 0x92, 0xf3, 0x0c, 0x6a, 0xda, 0xb8, 0xf2, 0x1f,
|
||||||
0x90, 0x93, 0xf3, 0x35, 0x34, 0x54, 0x70, 0xb5, 0xf7, 0xcc, 0x86, 0xa2, 0xfc, 0x54, 0xbb, 0xd0,
|
0xb2, 0xa1, 0x29, 0xef, 0xca, 0x47, 0xa5, 0xf6, 0x35, 0xd8, 0xf7, 0x5d, 0xdc, 0x70, 0xea, 0xf3,
|
||||||
0x7a, 0x8f, 0x60, 0xbf, 0x4e, 0xb1, 0xa2, 0xeb, 0x37, 0x2f, 0xbb, 0xbe, 0x71, 0x91, 0xcf, 0x6d,
|
0xbb, 0xa7, 0x3e, 0x70, 0x91, 0xb7, 0xc7, 0x76, 0x3e, 0x42, 0x5d, 0x07, 0x0a, 0x99, 0xd0, 0xb8,
|
||||||
0xfb, 0xbf, 0x42, 0x53, 0x0d, 0x14, 0x32, 0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0x96, 0x4b, 0x99, 0x83, 0x92, 0xf2, 0xf9, 0xe5, 0x46, 0x9f,
|
||||||
0xdb, 0x89, 0x39, 0xd0, 0x64, 0xce, 0xdf, 0x55, 0xe6, 0x5c, 0xd4, 0x78, 0x57, 0x39, 0xa7, 0xf7,
|
0x73, 0x8d, 0x73, 0x22, 0x04, 0x97, 0x9a, 0x9f, 0xa7, 0xca, 0xbf, 0x45, 0xda, 0x1f, 0xc0, 0xbe,
|
||||||
0x8a, 0x5f, 0x4c, 0xd5, 0xfc, 0x19, 0xe9, 0xfd, 0x02, 0xf6, 0x6b, 0x42, 0x39, 0x30, 0x43, 0x05,
|
0x4f, 0x28, 0x1a, 0x66, 0x68, 0xc3, 0x76, 0x8b, 0x86, 0x59, 0x05, 0x67, 0xfc, 0xba, 0x6e, 0xfd,
|
||||||
0xd6, 0x2d, 0x07, 0x66, 0x95, 0x93, 0xf9, 0x07, 0x9a, 0x23, 0xc6, 0x85, 0xb7, 0x01, 0xe8, 0x09,
|
0x3b, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x40, 0x3c, 0xbe, 0x3c, 0x05, 0x00, 0x00,
|
||||||
0xe7, 0x85, 0xa5, 0xcf, 0x5f, 0x5a, 0x52, 0x14, 0x8f, 0x70, 0xae, 0x2c, 0x08, 0x66, 0xef, 0x47,
|
|
||||||
0x30, 0xf6, 0x40, 0x59, 0xb2, 0x51, 0x21, 0xd9, 0x28, 0x4b, 0x9e, 0x41, 0x4b, 0xf5, 0x4b, 0x91,
|
|
||||||
0x0b, 0xf5, 0x28, 0xd8, 0xa5, 0x85, 0x68, 0xb7, 0x4a, 0x94, 0x48, 0xc6, 0xbc, 0xa9, 0x8e, 0xde,
|
|
||||||
0x05, 0x00, 0x00, 0xff, 0xff, 0x75, 0x38, 0xad, 0x84, 0xe4, 0x05, 0x00, 0x00,
|
|
||||||
}
|
}
|
||||||
|
9
vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto
generated
vendored
9
vendor/github.com/golang/protobuf/proto/proto3_proto/proto3.proto
generated
vendored
@ -76,12 +76,3 @@ message Nested {
|
|||||||
message MessageWithMap {
|
message MessageWithMap {
|
||||||
map<bool, bytes> byte_mapping = 1;
|
map<bool, bytes> byte_mapping = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
message IntMap {
|
|
||||||
map<int32, int32> rtt = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
message IntMaps {
|
|
||||||
repeated IntMap maps = 1;
|
|
||||||
}
|
|
||||||
|
10
vendor/github.com/golang/protobuf/proto/proto3_test.go
generated
vendored
10
vendor/github.com/golang/protobuf/proto/proto3_test.go
generated
vendored
@ -93,16 +93,6 @@ func TestRoundTripProto3(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGettersForBasicTypesExist(t *testing.T) {
|
|
||||||
var m pb.Message
|
|
||||||
if got := m.GetNested().GetBunny(); got != "" {
|
|
||||||
t.Errorf("m.GetNested().GetBunny() = %q, want empty string", got)
|
|
||||||
}
|
|
||||||
if got := m.GetNested().GetCute(); got {
|
|
||||||
t.Errorf("m.GetNested().GetCute() = %t, want false", got)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestProto3SetDefaults(t *testing.T) {
|
func TestProto3SetDefaults(t *testing.T) {
|
||||||
in := &pb.Message{
|
in := &pb.Message{
|
||||||
Terrain: map[string]*pb.Nested{
|
Terrain: map[string]*pb.Nested{
|
||||||
|
855
vendor/github.com/golang/protobuf/proto/testdata/test.pb.go
generated
vendored
855
vendor/github.com/golang/protobuf/proto/testdata/test.pb.go
generated
vendored
File diff suppressed because it is too large
Load Diff
6
vendor/github.com/golang/protobuf/proto/text_parser.go
generated
vendored
6
vendor/github.com/golang/protobuf/proto/text_parser.go
generated
vendored
@ -592,11 +592,7 @@ func (p *textParser) readStruct(sv reflect.Value, terminator string) error {
|
|||||||
props = oop.Prop
|
props = oop.Prop
|
||||||
nv := reflect.New(oop.Type.Elem())
|
nv := reflect.New(oop.Type.Elem())
|
||||||
dst = nv.Elem().Field(0)
|
dst = nv.Elem().Field(0)
|
||||||
field := sv.Field(oop.Field)
|
sv.Field(oop.Field).Set(nv)
|
||||||
if !field.IsNil() {
|
|
||||||
return p.errorf("field '%s' would overwrite already parsed oneof '%s'", name, sv.Type().Field(oop.Field).Name)
|
|
||||||
}
|
|
||||||
field.Set(nv)
|
|
||||||
}
|
}
|
||||||
if !dst.IsValid() {
|
if !dst.IsValid() {
|
||||||
return p.errorf("unknown field name %q in %v", name, st)
|
return p.errorf("unknown field name %q in %v", name, st)
|
||||||
|
11
vendor/github.com/golang/protobuf/proto/text_parser_test.go
generated
vendored
11
vendor/github.com/golang/protobuf/proto/text_parser_test.go
generated
vendored
@ -635,17 +635,6 @@ func TestOneofParsing(t *testing.T) {
|
|||||||
if !Equal(m, want) {
|
if !Equal(m, want) {
|
||||||
t.Errorf("\n got %v\nwant %v", m, want)
|
t.Errorf("\n got %v\nwant %v", m, want)
|
||||||
}
|
}
|
||||||
|
|
||||||
const inOverwrite = `name:"Shrek" number:42`
|
|
||||||
m = new(Communique)
|
|
||||||
testErr := "line 1.13: field 'number' would overwrite already parsed oneof 'Union'"
|
|
||||||
if err := UnmarshalText(inOverwrite, m); err == nil {
|
|
||||||
t.Errorf("TestOneofParsing: Didn't get expected error: %v", testErr)
|
|
||||||
} else if err.Error() != testErr {
|
|
||||||
t.Errorf("TestOneofParsing: Incorrect error.\nHave: %v\nWant: %v",
|
|
||||||
err.Error(), testErr)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var benchInput string
|
var benchInput string
|
||||||
|
309
vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go
generated
vendored
309
vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go
generated
vendored
@ -900,8 +900,19 @@ type FileOptions struct {
|
|||||||
// generated to contain the file's getDescriptor() method as well as any
|
// generated to contain the file's getDescriptor() method as well as any
|
||||||
// top-level extensions defined in the file.
|
// top-level extensions defined in the file.
|
||||||
JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"`
|
JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"`
|
||||||
// This option does nothing.
|
// If set true, then the Java code generator will generate equals() and
|
||||||
JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"`
|
// hashCode() methods for all messages defined in the .proto file.
|
||||||
|
// This increases generated code size, potentially substantially for large
|
||||||
|
// protos, which may harm a memory-constrained application.
|
||||||
|
// - In the full runtime this is a speed optimization, as the
|
||||||
|
// AbstractMessage base class includes reflection-based implementations of
|
||||||
|
// these methods.
|
||||||
|
// - In the lite runtime, setting this option changes the semantics of
|
||||||
|
// equals() and hashCode() to more closely match those of the full runtime;
|
||||||
|
// the generated methods compute their results based on field values rather
|
||||||
|
// than object identity. (Implementations should not assume that hashcodes
|
||||||
|
// will be consistent across runtimes or versions of the protocol compiler.)
|
||||||
|
JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash,def=0" json:"java_generate_equals_and_hash,omitempty"`
|
||||||
// If set true, then the Java2 code generator will generate code that
|
// If set true, then the Java2 code generator will generate code that
|
||||||
// throws an exception whenever an attempt is made to assign a non-UTF-8
|
// throws an exception whenever an attempt is made to assign a non-UTF-8
|
||||||
// byte sequence to a string field.
|
// byte sequence to a string field.
|
||||||
@ -962,6 +973,7 @@ func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Default_FileOptions_JavaMultipleFiles bool = false
|
const Default_FileOptions_JavaMultipleFiles bool = false
|
||||||
|
const Default_FileOptions_JavaGenerateEqualsAndHash bool = false
|
||||||
const Default_FileOptions_JavaStringCheckUtf8 bool = false
|
const Default_FileOptions_JavaStringCheckUtf8 bool = false
|
||||||
const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED
|
const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED
|
||||||
const Default_FileOptions_CcGenericServices bool = false
|
const Default_FileOptions_CcGenericServices bool = false
|
||||||
@ -995,7 +1007,7 @@ func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool {
|
|||||||
if m != nil && m.JavaGenerateEqualsAndHash != nil {
|
if m != nil && m.JavaGenerateEqualsAndHash != nil {
|
||||||
return *m.JavaGenerateEqualsAndHash
|
return *m.JavaGenerateEqualsAndHash
|
||||||
}
|
}
|
||||||
return false
|
return Default_FileOptions_JavaGenerateEqualsAndHash
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *FileOptions) GetJavaStringCheckUtf8() bool {
|
func (m *FileOptions) GetJavaStringCheckUtf8() bool {
|
||||||
@ -1225,7 +1237,7 @@ type FieldOptions struct {
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Note that implementations may choose not to check required fields within
|
// Note that implementations may choose not to check required fields within
|
||||||
// a lazy sub-message. That is, calling IsInitialized() on the outer message
|
// a lazy sub-message. That is, calling IsInitialized() on the outher message
|
||||||
// may return true even if the inner message has missing required fields.
|
// may return true even if the inner message has missing required fields.
|
||||||
// This is necessary because otherwise the inner message would have to be
|
// This is necessary because otherwise the inner message would have to be
|
||||||
// parsed in order to perform the check, defeating the purpose of lazy
|
// parsed in order to perform the check, defeating the purpose of lazy
|
||||||
@ -1917,149 +1929,148 @@ func init() {
|
|||||||
func init() { proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor0) }
|
func init() { proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor0) }
|
||||||
|
|
||||||
var fileDescriptor0 = []byte{
|
var fileDescriptor0 = []byte{
|
||||||
// 2295 bytes of a gzipped FileDescriptorProto
|
// 2287 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x59, 0x4f, 0x6f, 0x1b, 0xc7,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xcc, 0x59, 0xcd, 0x73, 0xdb, 0xc6,
|
||||||
0x15, 0xcf, 0xf2, 0x9f, 0xc8, 0x47, 0x8a, 0x1a, 0x8d, 0x14, 0x67, 0xad, 0xfc, 0xb1, 0xcc, 0xd8,
|
0x15, 0x0f, 0xf8, 0x25, 0xf2, 0x91, 0xa2, 0x56, 0x2b, 0xc5, 0x86, 0xe5, 0x38, 0x96, 0x19, 0x3b,
|
||||||
0xb1, 0x6c, 0xb7, 0x74, 0x20, 0xff, 0x89, 0xa3, 0x14, 0x29, 0x28, 0x71, 0xad, 0xd0, 0x90, 0x44,
|
0x96, 0xed, 0x96, 0xce, 0xc8, 0x1f, 0x71, 0x94, 0x4e, 0x3a, 0x94, 0x08, 0x2b, 0xf4, 0x50, 0x22,
|
||||||
0x76, 0x29, 0xb5, 0x4e, 0x2e, 0x8b, 0xd1, 0xee, 0x90, 0x5a, 0x7b, 0x39, 0xbb, 0xdd, 0x5d, 0xda,
|
0x0b, 0x4a, 0xad, 0x93, 0x1e, 0x30, 0x2b, 0x60, 0x49, 0xc1, 0x06, 0x17, 0x28, 0x00, 0xda, 0x56,
|
||||||
0x56, 0x4e, 0x06, 0x7a, 0xea, 0xa5, 0xe7, 0xa2, 0x2d, 0x7a, 0xc8, 0x25, 0x40, 0x3f, 0x40, 0x0f,
|
0x4e, 0x9e, 0xe9, 0xa9, 0xc7, 0xde, 0x3a, 0x6d, 0xa7, 0xd3, 0xc9, 0x25, 0x33, 0xfd, 0x03, 0x7a,
|
||||||
0xfd, 0x0a, 0x05, 0x0a, 0xf4, 0x2b, 0x14, 0x05, 0xda, 0x6f, 0x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x75, 0xac, 0x69, 0x13, 0x63,
|
||||||
0x44, 0x0f, 0x3f, 0x80, 0x25, 0xd7, 0x0b, 0x6d, 0x97, 0x05, 0x6a, 0x79, 0x53, 0xd9, 0xaa, 0x6e,
|
0x3d, 0xfc, 0x10, 0x96, 0x5c, 0x2f, 0xb4, 0x5d, 0x16, 0xa8, 0xc5, 0x4d, 0x65, 0xab, 0xbc, 0xfd,
|
||||||
0xbf, 0x33, 0x37, 0x11, 0xba, 0x92, 0xa3, 0xc7, 0x64, 0xdc, 0x01, 0x14, 0xb8, 0x63, 0xdf, 0xa4,
|
0xce, 0xdc, 0x44, 0xe8, 0x48, 0x8e, 0x1e, 0x93, 0x71, 0x0b, 0x50, 0xe0, 0x8e, 0x7c, 0x93, 0x1a,
|
||||||
0x86, 0xe9, 0x5a, 0xd4, 0xb0, 0xd9, 0xc0, 0x55, 0x2b, 0xc2, 0xc0, 0x95, 0xd9, 0x85, 0x08, 0xe2,
|
0xa6, 0x6b, 0x51, 0xc3, 0x66, 0x7d, 0x57, 0x2d, 0x09, 0x03, 0x57, 0x67, 0x37, 0x22, 0x88, 0x7b,
|
||||||
0x9e, 0x6b, 0xd1, 0x0e, 0x1b, 0xb8, 0x7a, 0x3d, 0xc8, 0x8c, 0xf1, 0x25, 0x28, 0x05, 0xe7, 0x2c,
|
0xae, 0x45, 0x5b, 0xac, 0xef, 0xea, 0xd5, 0x60, 0x62, 0x8d, 0x2f, 0x40, 0x21, 0x38, 0x63, 0x21,
|
||||||
0x24, 0x2f, 0xd5, 0x9a, 0xc8, 0x90, 0x68, 0xd4, 0xf8, 0x4f, 0x11, 0x56, 0x2e, 0x92, 0x62, 0x9f,
|
0x79, 0xa5, 0x56, 0x44, 0x86, 0x44, 0xab, 0xda, 0x7f, 0xf2, 0xb0, 0x72, 0x9e, 0x14, 0xfb, 0x18,
|
||||||
0x40, 0x71, 0xc0, 0x57, 0xa9, 0xe6, 0xfe, 0x97, 0x18, 0x48, 0x9d, 0x6c, 0x10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be, 0x9a, 0x17,
|
0x58, 0x9f, 0x97, 0x73, 0x73, 0xd3, 0xff, 0x02, 0x14, 0xd8, 0x68, 0x78, 0x42, 0x7d, 0x35, 0x2b,
|
||||||
0x16, 0xa2, 0x11, 0x6e, 0x41, 0xd1, 0x21, 0xa7, 0xd4, 0x51, 0x0b, 0x9b, 0xca, 0x56, 0x7d, 0xfb,
|
0x2c, 0x44, 0x2b, 0xdc, 0x80, 0xbc, 0x43, 0x4e, 0xa8, 0xa3, 0xe6, 0x36, 0x95, 0xad, 0xea, 0xf6,
|
||||||
0xf6, 0x85, 0xb2, 0xba, 0x79, 0xc0, 0x55, 0x74, 0xa9, 0x89, 0x3f, 0x85, 0x42, 0x54, 0xe2, 0xb8,
|
0x9d, 0x73, 0x65, 0x75, 0xbd, 0xcd, 0x55, 0x74, 0xa9, 0x89, 0x3f, 0x81, 0x5c, 0x54, 0xe2, 0xb8,
|
||||||
0x85, 0x5b, 0x17, 0xb3, 0xc0, 0x73, 0x51, 0x17, 0x7a, 0xf8, 0x6d, 0xa8, 0xf0, 0xbf, 0x32, 0xb6,
|
0x85, 0xdb, 0xe7, 0xb3, 0xc0, 0x73, 0x51, 0x17, 0x7a, 0xf8, 0x32, 0x94, 0xf8, 0x5f, 0x19, 0xdb,
|
||||||
0x25, 0xe1, 0x73, 0x99, 0x03, 0x3c, 0xae, 0x78, 0x03, 0xca, 0x22, 0xcd, 0x2c, 0x1a, 0x5f, 0x0d,
|
0x82, 0xf0, 0xb9, 0xc8, 0x01, 0x1e, 0x57, 0xbc, 0x01, 0x45, 0x91, 0x66, 0x16, 0x8d, 0x5b, 0x43,
|
||||||
0xc9, 0x98, 0x6f, 0x8c, 0x45, 0x07, 0x64, 0xec, 0x84, 0xc6, 0x73, 0xe2, 0x8c, 0xa9, 0x48, 0x98,
|
0xb2, 0xe6, 0x07, 0x63, 0xd1, 0x3e, 0x19, 0x39, 0xa1, 0xf1, 0x82, 0x38, 0x23, 0x2a, 0x12, 0xa6,
|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
|
||||||
0xe6, 0x5c, 0xe3, 0x73, 0x1d, 0x7d, 0x17, 0xc0, 0x66, 0xde, 0x38, 0x94, 0x17, 0xb2, 0xac, 0x4f,
|
0xcf, 0x35, 0x3e, 0xd7, 0xd1, 0x2b, 0x00, 0x36, 0xf3, 0x46, 0xa1, 0x6c, 0xc8, 0xb2, 0x3e, 0x95,
|
||||||
0x15, 0x81, 0x88, 0xb3, 0xcf, 0x6b, 0xcf, 0x38, 0x4c, 0xe4, 0x79, 0x21, 0x07, 0x09, 0x09, 0xc2,
|
0x04, 0x22, 0xde, 0x7d, 0x5e, 0x7b, 0x46, 0x61, 0x22, 0xcf, 0x0a, 0x39, 0x48, 0x48, 0x10, 0x1e,
|
||||||
0xc3, 0x89, 0xa3, 0x05, 0xe1, 0xe8, 0x7b, 0x0b, 0x56, 0x3a, 0x73, 0xd7, 0x7d, 0x08, 0xc8, 0x74,
|
0x8d, 0x1d, 0xcd, 0x09, 0x47, 0xdf, 0x5d, 0xb0, 0xd3, 0x99, 0x5e, 0xf7, 0x01, 0x20, 0xd3, 0xb1,
|
||||||
0x6c, 0xca, 0x42, 0x23, 0x08, 0x7d, 0x4a, 0x46, 0x36, 0x1b, 0x8a, 0x02, 0x5c, 0xde, 0x29, 0x0e,
|
0x29, 0x0b, 0x8d, 0x20, 0xf4, 0x29, 0x19, 0xda, 0x6c, 0x20, 0x0a, 0x70, 0x71, 0x27, 0xdf, 0x27,
|
||||||
0x88, 0x13, 0x50, 0x7d, 0x45, 0x8a, 0xfb, 0xb1, 0x94, 0x6b, 0x88, 0x5b, 0xc6, 0x4f, 0x69, 0x94,
|
0x4e, 0x40, 0xf5, 0x15, 0x29, 0xee, 0xc5, 0x52, 0xae, 0x21, 0xba, 0x8c, 0x9f, 0xd2, 0x28, 0x4c,
|
||||||
0x32, 0x1a, 0x52, 0x9c, 0x68, 0x34, 0x7e, 0xb3, 0x04, 0xd5, 0x54, 0x5b, 0x87, 0xaf, 0x42, 0xed,
|
0x68, 0x48, 0x71, 0xa2, 0x51, 0xfb, 0xf5, 0x12, 0x94, 0x53, 0x63, 0x1d, 0xbe, 0x06, 0x95, 0x67,
|
||||||
0x29, 0x79, 0x4e, 0x8c, 0xb8, 0x55, 0x97, 0x91, 0xa8, 0x72, 0xac, 0x17, 0xb5, 0xeb, 0x1f, 0xc2,
|
0xe4, 0x05, 0x31, 0xe2, 0x51, 0x5d, 0x46, 0xa2, 0xcc, 0xb1, 0x6e, 0x34, 0xae, 0x7f, 0x00, 0xeb,
|
||||||
0xba, 0xa0, 0xb8, 0xe3, 0x90, 0xfa, 0x86, 0xe9, 0x90, 0x20, 0x10, 0x41, 0x2b, 0x0b, 0x2a, 0xe6,
|
0x82, 0xe2, 0x8e, 0x42, 0xea, 0x1b, 0xa6, 0x43, 0x82, 0x40, 0x04, 0xad, 0x28, 0xa8, 0x98, 0xcb,
|
||||||
0xb2, 0x2e, 0x17, 0xed, 0xc5, 0x12, 0x7c, 0x1f, 0xd6, 0x84, 0xc6, 0x68, 0xec, 0x84, 0xb6, 0xe7,
|
0x3a, 0x5c, 0xb4, 0x17, 0x4b, 0xf0, 0x03, 0x58, 0x13, 0x1a, 0xc3, 0x91, 0x13, 0xda, 0x9e, 0x43,
|
||||||
0x50, 0x83, 0x7f, 0x3c, 0x04, 0xa2, 0x10, 0x27, 0x9e, 0xad, 0x72, 0xc6, 0x61, 0x44, 0xe0, 0x1e,
|
0x0d, 0xfe, 0xf1, 0x10, 0x88, 0x42, 0x9c, 0x78, 0xb6, 0xca, 0x19, 0x07, 0x11, 0x81, 0x7b, 0x14,
|
||||||
0x05, 0xb8, 0x0d, 0xef, 0x0a, 0xb5, 0x21, 0x65, 0xd4, 0x27, 0x21, 0x35, 0xe8, 0x2f, 0xc7, 0xc4,
|
0xe0, 0x7d, 0xb8, 0x22, 0xd4, 0x06, 0x94, 0x51, 0x9f, 0x84, 0xd4, 0xa0, 0xbf, 0x18, 0x11, 0x27,
|
||||||
0x09, 0x0c, 0xc2, 0x2c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 0x1f, 0x93, 0x40, 0xae, 0x47, 0xac, 0x3e, 0x0d, 0x7f, 0x61, 0xfb, 0x3c, 0xd7,
|
0x20, 0xd7, 0x23, 0x56, 0x8f, 0x86, 0x3f, 0xb3, 0x7d, 0x9e, 0x6b, 0x43, 0x12, 0xe2, 0x36, 0x5c,
|
||||||
0x46, 0x24, 0xc4, 0x07, 0x70, 0x85, 0xb9, 0x46, 0x10, 0x12, 0x66, 0x11, 0xdf, 0x32, 0x26, 0x6f,
|
0x65, 0xae, 0x11, 0x84, 0x84, 0x59, 0xc4, 0xb7, 0x8c, 0xf1, 0x35, 0x81, 0x41, 0x4c, 0x93, 0x06,
|
||||||
0x04, 0x06, 0x31, 0x4d, 0x1a, 0x04, 0xae, 0xbc, 0x05, 0x12, 0x2b, 0xef, 0x30, 0xb7, 0x1f, 0x91,
|
0x81, 0x2b, 0x1b, 0x41, 0x62, 0xe5, 0x1d, 0xe6, 0xf6, 0x22, 0xf2, 0xb8, 0x42, 0x36, 0x22, 0xea,
|
||||||
0x27, 0xe5, 0xb1, 0x15, 0x51, 0xa7, 0x36, 0x3d, 0xbf, 0x68, 0xd3, 0xdf, 0x86, 0xca, 0x88, 0x78,
|
0xd4, 0xa1, 0x67, 0x17, 0x1d, 0xfa, 0x65, 0x28, 0x0d, 0x89, 0x67, 0x50, 0x16, 0xfa, 0x67, 0x62,
|
||||||
0x06, 0x65, 0xa1, 0x7f, 0x2e, 0x5a, 0xb6, 0xb2, 0x5e, 0x1e, 0x11, 0x4f, 0xe3, 0xe3, 0xef, 0x6e,
|
0x6a, 0x2b, 0xea, 0xc5, 0x21, 0xf1, 0x34, 0xbe, 0xfe, 0xf6, 0x4e, 0x22, 0x15, 0xcd, 0xda, 0x3f,
|
||||||
0x27, 0xb2, 0xd1, 0x2c, 0xa3, 0x4a, 0xe3, 0x1f, 0x79, 0xa8, 0xa5, 0x9b, 0x37, 0xde, 0x0b, 0x9b,
|
0xb2, 0x50, 0x49, 0x4f, 0x6e, 0x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0xf7, 0xd5, 0xa1, 0xc4, 0x12, 0x0d, 0xb2, 0x3b, 0x1a, 0x51, 0x16, 0x06,
|
0x87, 0x43, 0xca, 0xc2, 0x20, 0x3e, 0xd7, 0x08, 0xdf, 0x8b, 0x60, 0x7c, 0x07, 0x56, 0x43, 0x9f,
|
||||||
0xf1, 0xbe, 0x46, 0xf8, 0x5e, 0x04, 0xe3, 0xdb, 0xb0, 0x1a, 0xfa, 0xc4, 0x76, 0x32, 0xdc, 0x82,
|
0xd8, 0xce, 0x04, 0x37, 0x27, 0xb8, 0x28, 0x16, 0x24, 0xe4, 0x1d, 0xb8, 0x14, 0xdb, 0xb5, 0x68,
|
||||||
0xe0, 0xa2, 0x58, 0x90, 0x90, 0x77, 0xe0, 0x72, 0x6c, 0xd7, 0xa2, 0x21, 0x31, 0xcf, 0xa8, 0x35,
|
0x48, 0xcc, 0x53, 0x6a, 0x8d, 0x95, 0x0a, 0xe2, 0x6a, 0xed, 0x62, 0x44, 0x68, 0x46, 0xf2, 0x58,
|
||||||
0x51, 0x2a, 0x89, 0x37, 0xb6, 0xb7, 0x22, 0x42, 0x3b, 0x92, 0xc7, 0xba, 0x8d, 0xbf, 0x2b, 0xb0,
|
0xb7, 0xf6, 0x77, 0x05, 0x56, 0xe3, 0x31, 0xde, 0x4a, 0x82, 0x75, 0x00, 0x40, 0x18, 0x73, 0xc3,
|
||||||
0x1a, 0xb7, 0xf4, 0x56, 0x12, 0xac, 0x43, 0x00, 0xc2, 0x98, 0x1b, 0xa6, 0xc3, 0x35, 0x9b, 0xca,
|
0x74, 0xb8, 0x66, 0x53, 0x79, 0x46, 0xaf, 0xde, 0x48, 0x94, 0xf4, 0x94, 0x81, 0x8d, 0x21, 0xc0,
|
||||||
0x33, 0x7a, 0xcd, 0x56, 0xa2, 0xa4, 0xa7, 0x0c, 0x6c, 0x8c, 0x00, 0x26, 0x92, 0x85, 0x61, 0xbb,
|
0x58, 0xb2, 0x30, 0x6c, 0x57, 0xa1, 0x1c,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 0x00,
|
|
||||||
}
|
}
|
||||||
|
12
vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go
generated
vendored
12
vendor/github.com/golang/protobuf/protoc-gen-go/generator/generator.go
generated
vendored
@ -626,6 +626,7 @@ func (g *Generator) CommandLineParameters(parameter string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if pluginList != "" {
|
if pluginList != "" {
|
||||||
// Amend the set of plugins.
|
// Amend the set of plugins.
|
||||||
enabled := make(map[string]bool)
|
enabled := make(map[string]bool)
|
||||||
@ -1180,6 +1181,7 @@ func (g *Generator) generate(file *FileDescriptor) {
|
|||||||
g.P("const _ = ", g.Pkg["proto"], ".ProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package")
|
g.P("const _ = ", g.Pkg["proto"], ".ProtoPackageIsVersion", generatedCodeVersion, " // please upgrade the proto package")
|
||||||
g.P()
|
g.P()
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, td := range g.file.imp {
|
for _, td := range g.file.imp {
|
||||||
g.generateImported(td)
|
g.generateImported(td)
|
||||||
}
|
}
|
||||||
@ -2076,6 +2078,11 @@ func (g *Generator) generateMessage(message *Descriptor) {
|
|||||||
star = "*"
|
star = "*"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In proto3, only generate getters for message fields and oneof fields.
|
||||||
|
if message.proto3() && *field.Type != descriptor.FieldDescriptorProto_TYPE_MESSAGE && !oneof {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// Only export getter symbols for basic types,
|
// Only export getter symbols for basic types,
|
||||||
// and for messages and enums in the same package.
|
// and for messages and enums in the same package.
|
||||||
// Groups are not exported.
|
// Groups are not exported.
|
||||||
@ -2134,11 +2141,7 @@ func (g *Generator) generateMessage(message *Descriptor) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if !oneof {
|
if !oneof {
|
||||||
if message.proto3() {
|
|
||||||
g.P("if m != nil {")
|
|
||||||
} else {
|
|
||||||
g.P("if m != nil && m." + fname + " != nil {")
|
g.P("if m != nil && m." + fname + " != nil {")
|
||||||
}
|
|
||||||
g.In()
|
g.In()
|
||||||
g.P("return " + star + "m." + fname)
|
g.P("return " + star + "m." + fname)
|
||||||
g.Out()
|
g.Out()
|
||||||
@ -2556,7 +2559,6 @@ func (g *Generator) generateExtension(ext *ExtensionDescriptor) {
|
|||||||
g.P("Field: ", field.Number, ",")
|
g.P("Field: ", field.Number, ",")
|
||||||
g.P(`Name: "`, extName, `",`)
|
g.P(`Name: "`, extName, `",`)
|
||||||
g.P("Tag: ", tag, ",")
|
g.P("Tag: ", tag, ",")
|
||||||
g.P(`Filename: "`, g.file.GetName(), `",`)
|
|
||||||
|
|
||||||
g.Out()
|
g.Out()
|
||||||
g.P("}")
|
g.P("}")
|
||||||
|
4
vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go
generated
vendored
4
vendor/github.com/golang/protobuf/protoc-gen-go/grpc/grpc.go
generated
vendored
@ -48,7 +48,7 @@ import (
|
|||||||
// It is incremented whenever an incompatibility between the generated code and
|
// It is incremented whenever an incompatibility between the generated code and
|
||||||
// the grpc package is introduced; the generated code references
|
// the grpc package is introduced; the generated code references
|
||||||
// a constant, grpc.SupportPackageIsVersionN (where N is generatedCodeVersion).
|
// a constant, grpc.SupportPackageIsVersionN (where N is generatedCodeVersion).
|
||||||
const generatedCodeVersion = 4
|
const generatedCodeVersion = 3
|
||||||
|
|
||||||
// Paths for packages used by code generated in this file,
|
// Paths for packages used by code generated in this file,
|
||||||
// relative to the import_prefix of the generator.Generator.
|
// relative to the import_prefix of the generator.Generator.
|
||||||
@ -254,7 +254,7 @@ func (g *grpc) generateService(file *generator.FileDescriptor, service *pb.Servi
|
|||||||
g.P("},")
|
g.P("},")
|
||||||
}
|
}
|
||||||
g.P("},")
|
g.P("},")
|
||||||
g.P("Metadata: \"", file.GetName(), "\",")
|
g.P("Metadata: ", file.VarName(), ",")
|
||||||
g.P("}")
|
g.P("}")
|
||||||
g.P()
|
g.P()
|
||||||
}
|
}
|
||||||
|
2
vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile
generated
vendored
2
vendor/github.com/golang/protobuf/protoc-gen-go/testdata/Makefile
generated
vendored
@ -58,7 +58,7 @@ testbuild: regenerate
|
|||||||
|
|
||||||
regenerate:
|
regenerate:
|
||||||
# Invoke protoc once to generate three independent .pb.go files in the same package.
|
# Invoke protoc once to generate three independent .pb.go files in the same package.
|
||||||
protoc --go_out=. multi/multi1.proto multi/multi2.proto multi/multi3.proto
|
protoc --go_out=. multi/multi{1,2,3}.proto
|
||||||
|
|
||||||
#extension_test: extension_test.$O
|
#extension_test: extension_test.$O
|
||||||
# $(LD) -L. -o $@ $<
|
# $(LD) -L. -o $@ $<
|
||||||
|
24
vendor/github.com/huandu/xstrings/.gitignore
generated
vendored
Normal file
24
vendor/github.com/huandu/xstrings/.gitignore
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||||
|
*.o
|
||||||
|
*.a
|
||||||
|
*.so
|
||||||
|
|
||||||
|
# Folders
|
||||||
|
_obj
|
||||||
|
_test
|
||||||
|
|
||||||
|
# Architecture specific extensions/prefixes
|
||||||
|
*.[568vq]
|
||||||
|
[568vq].out
|
||||||
|
|
||||||
|
*.cgo1.go
|
||||||
|
*.cgo2.c
|
||||||
|
_cgo_defun.c
|
||||||
|
_cgo_gotypes.go
|
||||||
|
_cgo_export.*
|
||||||
|
|
||||||
|
_testmain.go
|
||||||
|
|
||||||
|
*.exe
|
||||||
|
*.test
|
||||||
|
*.prof
|
1
vendor/github.com/huandu/xstrings/.travis.yml
generated
vendored
Normal file
1
vendor/github.com/huandu/xstrings/.travis.yml
generated
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
language: go
|
23
vendor/github.com/huandu/xstrings/CONTRIBUTING.md
generated
vendored
Normal file
23
vendor/github.com/huandu/xstrings/CONTRIBUTING.md
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Contributing #
|
||||||
|
|
||||||
|
Thanks for your contribution in advance. No matter what you will contribute to this project, pull request or bug report or feature discussion, it's always highly appreciated.
|
||||||
|
|
||||||
|
## New API or feature ##
|
||||||
|
|
||||||
|
I want to speak more about how to add new functions to this package.
|
||||||
|
|
||||||
|
Package `xstring` is a collection of useful string functions which should be implemented in Go. It's a bit subject to say which function should be included and which should not. I set up following rules in order to make it clear and as objective as possible.
|
||||||
|
|
||||||
|
* Rule 1: Only string algorithm, which takes string as input, can be included.
|
||||||
|
* Rule 2: If a function has been implemented in package `string`, it must not be included.
|
||||||
|
* Rule 3: If a function is not language neutral, it must not be included.
|
||||||
|
* Rule 4: If a function is a part of standard library in other languages, it can be included.
|
||||||
|
* Rule 5: If a function is quite useful in some famous framework or library, it can be included.
|
||||||
|
|
||||||
|
New function must be discussed in project issues before submitting any code. If a pull request with new functions is sent without any ref issue, it will be rejected.
|
||||||
|
|
||||||
|
## Pull request ##
|
||||||
|
|
||||||
|
Pull request is always welcome. Just make sure you have run `go fmt` and all test cases passed before submit.
|
||||||
|
|
||||||
|
If the pull request is to add a new API or feature, don't forget to update README.md and add new API in function list.
|
22
vendor/github.com/huandu/xstrings/LICENSE
generated
vendored
Normal file
22
vendor/github.com/huandu/xstrings/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2015 Huan Du
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
114
vendor/github.com/huandu/xstrings/README.md
generated
vendored
Normal file
114
vendor/github.com/huandu/xstrings/README.md
generated
vendored
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
# xstrings #
|
||||||
|
|
||||||
|
[![Build Status](https://travis-ci.org/huandu/xstrings.png?branch=master)](https://travis-ci.org/huandu/xstrings)
|
||||||
|
[![GoDoc](https://godoc.org/github.com/huandu/xstrings?status.svg)](https://godoc.org/github.com/huandu/xstrings)
|
||||||
|
|
||||||
|
Go package [xstrings](https://godoc.org/github.com/huandu/xstrings) is a collection of string functions, which are widely used in other languages but absent in Go package [strings](http://golang.org/pkg/strings).
|
||||||
|
|
||||||
|
All functions are well tested and carefully tuned for performance.
|
||||||
|
|
||||||
|
## Propose a new function ##
|
||||||
|
|
||||||
|
Please review [contributing guideline](CONTRIBUTING.md) and [create new issue](https://github.com/huandu/xstrings/issues) to state why it should be included.
|
||||||
|
|
||||||
|
## Install ##
|
||||||
|
|
||||||
|
Use `go get` to install this library.
|
||||||
|
|
||||||
|
go get github.com/huandu/xstrings
|
||||||
|
|
||||||
|
## API document ##
|
||||||
|
|
||||||
|
See [GoDoc](https://godoc.org/github.com/huandu/xstrings) for full document.
|
||||||
|
|
||||||
|
## Function list ##
|
||||||
|
|
||||||
|
Go functions have a unique naming style. One, who has experience in other language but new in Go, may have difficulties to find out right string function to use.
|
||||||
|
|
||||||
|
Here is a list of functions in [strings](http://golang.org/pkg/strings) and [xstrings](https://godoc.org/github.com/huandu/xstrings) with enough extra information about how to map these functions to their friends in other languages. Hope this list could be helpful for fresh gophers.
|
||||||
|
|
||||||
|
### Package `xstrings` functions ###
|
||||||
|
|
||||||
|
*Keep this table sorted by Function in ascending order.*
|
||||||
|
|
||||||
|
| Function | Friends | # |
|
||||||
|
| -------- | ------- | --- |
|
||||||
|
| [Center](https://godoc.org/github.com/huandu/xstrings#Center) | `str.center` in Python; `String#center` in Ruby | [#30](https://github.com/huandu/xstrings/issues/30) |
|
||||||
|
| [Count](https://godoc.org/github.com/huandu/xstrings#Count) | `String#count` in Ruby | [#16](https://github.com/huandu/xstrings/issues/16) |
|
||||||
|
| [Delete](https://godoc.org/github.com/huandu/xstrings#Delete) | `String#delete` in Ruby | [#17](https://github.com/huandu/xstrings/issues/17) |
|
||||||
|
| [ExpandTabs](https://godoc.org/github.com/huandu/xstrings#ExpandTabs) | `str.expandtabs` in Python | [#27](https://github.com/huandu/xstrings/issues/27) |
|
||||||
|
| [FirstRuneToLower](https://godoc.org/github.com/huandu/xstrings#FirstRuneToLower) | `lcfirst` in PHP or Perl | [#15](https://github.com/huandu/xstrings/issues/15) |
|
||||||
|
| [FirstRuneToUpper](https://godoc.org/github.com/huandu/xstrings#FirstRuneToUpper) | `String#capitalize` in Ruby; `ucfirst` in PHP or Perl | [#15](https://github.com/huandu/xstrings/issues/15) |
|
||||||
|
| [Insert](https://godoc.org/github.com/huandu/xstrings#Insert) | `String#insert` in Ruby | [#18](https://github.com/huandu/xstrings/issues/18) |
|
||||||
|
| [LastPartition](https://godoc.org/github.com/huandu/xstrings#LastPartition) | `str.rpartition` in Python; `String#rpartition` in Ruby | [#19](https://github.com/huandu/xstrings/issues/19) |
|
||||||
|
| [LeftJustify](https://godoc.org/github.com/huandu/xstrings#LeftJustify) | `str.ljust` in Python; `String#ljust` in Ruby | [#28](https://github.com/huandu/xstrings/issues/28) |
|
||||||
|
| [Len](https://godoc.org/github.com/huandu/xstrings#Len) | `mb_strlen` in PHP | [#23](https://github.com/huandu/xstrings/issues/23) |
|
||||||
|
| [Partition](https://godoc.org/github.com/huandu/xstrings#Partition) | `str.partition` in Python; `String#partition` in Ruby | [#10](https://github.com/huandu/xstrings/issues/10) |
|
||||||
|
| [Reverse](https://godoc.org/github.com/huandu/xstrings#Reverse) | `String#reverse` in Ruby; `strrev` in PHP; `reverse` in Perl | [#7](https://github.com/huandu/xstrings/issues/7) |
|
||||||
|
| [RightJustify](https://godoc.org/github.com/huandu/xstrings#RightJustify) | `str.rjust` in Python; `String#rjust` in Ruby | [#29](https://github.com/huandu/xstrings/issues/29) |
|
||||||
|
| [RuneWidth](https://godoc.org/github.com/huandu/xstrings#RuneWidth) | - | [#27](https://github.com/huandu/xstrings/issues/27) |
|
||||||
|
| [Scrub](https://godoc.org/github.com/huandu/xstrings#Scrub) | `String#scrub` in Ruby | [#20](https://github.com/huandu/xstrings/issues/20) |
|
||||||
|
| [Shuffle](https://godoc.org/github.com/huandu/xstrings#Shuffle) | `str_shuffle` in PHP | [#13](https://github.com/huandu/xstrings/issues/13) |
|
||||||
|
| [ShuffleSource](https://godoc.org/github.com/huandu/xstrings#ShuffleSource) | `str_shuffle` in PHP | [#13](https://github.com/huandu/xstrings/issues/13) |
|
||||||
|
| [Slice](https://godoc.org/github.com/huandu/xstrings#Slice) | `mb_substr` in PHP | [#9](https://github.com/huandu/xstrings/issues/9) |
|
||||||
|
| [Squeeze](https://godoc.org/github.com/huandu/xstrings#Squeeze) | `String#squeeze` in Ruby | [#11](https://github.com/huandu/xstrings/issues/11) |
|
||||||
|
| [Successor](https://godoc.org/github.com/huandu/xstrings#Successor) | `String#succ` or `String#next` in Ruby | [#22](https://github.com/huandu/xstrings/issues/22) |
|
||||||
|
| [SwapCase](https://godoc.org/github.com/huandu/xstrings#SwapCase) | `str.swapcase` in Python; `String#swapcase` in Ruby | [#12](https://github.com/huandu/xstrings/issues/12) |
|
||||||
|
| [ToCamelCase](https://godoc.org/github.com/huandu/xstrings#ToCamelCase) | `String#camelize` in RoR | [#1](https://github.com/huandu/xstrings/issues/1) |
|
||||||
|
| [ToSnakeCase](https://godoc.org/github.com/huandu/xstrings#ToSnakeCase) | `String#underscore` in RoR | [#1](https://github.com/huandu/xstrings/issues/1) |
|
||||||
|
| [Translate](https://godoc.org/github.com/huandu/xstrings#Translate) | `str.translate` in Python; `String#tr` in Ruby; `strtr` in PHP; `tr///` in Perl | [#21](https://github.com/huandu/xstrings/issues/21) |
|
||||||
|
| [Width](https://godoc.org/github.com/huandu/xstrings#Width) | `mb_strwidth` in PHP | [#26](https://github.com/huandu/xstrings/issues/26) |
|
||||||
|
| [WordCount](https://godoc.org/github.com/huandu/xstrings#WordCount) | `str_word_count` in PHP | [#14](https://github.com/huandu/xstrings/issues/14) |
|
||||||
|
| [WordSplit](https://godoc.org/github.com/huandu/xstrings#WordSplit) | - | [#14](https://github.com/huandu/xstrings/issues/14) |
|
||||||
|
|
||||||
|
### Package `strings` functions ###
|
||||||
|
|
||||||
|
*Keep this table sorted by Function in ascending order.*
|
||||||
|
|
||||||
|
| Function | Friends |
|
||||||
|
| -------- | ------- |
|
||||||
|
| [Contains](http://golang.org/pkg/strings/#Contains) | `String#include?` in Ruby |
|
||||||
|
| [ContainsAny](http://golang.org/pkg/strings/#ContainsAny) | - |
|
||||||
|
| [ContainsRune](http://golang.org/pkg/strings/#ContainsRune) | - |
|
||||||
|
| [Count](http://golang.org/pkg/strings/#Count) | `str.count` in Python; `substr_count` in PHP |
|
||||||
|
| [EqualFold](http://golang.org/pkg/strings/#EqualFold) | `stricmp` in PHP; `String#casecmp` in Ruby |
|
||||||
|
| [Fields](http://golang.org/pkg/strings/#Fields) | `str.split` in Python; `split` in Perl; `String#split` in Ruby |
|
||||||
|
| [FieldsFunc](http://golang.org/pkg/strings/#FieldsFunc) | - |
|
||||||
|
| [HasPrefix](http://golang.org/pkg/strings/#HasPrefix) | `str.startswith` in Python; `String#start_with?` in Ruby |
|
||||||
|
| [HasSuffix](http://golang.org/pkg/strings/#HasSuffix) | `str.endswith` in Python; `String#end_with?` in Ruby |
|
||||||
|
| [Index](http://golang.org/pkg/strings/#Index) | `str.index` in Python; `String#index` in Ruby; `strpos` in PHP; `index` in Perl |
|
||||||
|
| [IndexAny](http://golang.org/pkg/strings/#IndexAny) | - |
|
||||||
|
| [IndexByte](http://golang.org/pkg/strings/#IndexByte) | - |
|
||||||
|
| [IndexFunc](http://golang.org/pkg/strings/#IndexFunc) | - |
|
||||||
|
| [IndexRune](http://golang.org/pkg/strings/#IndexRune) | - |
|
||||||
|
| [Join](http://golang.org/pkg/strings/#Join) | `str.join` in Python; `Array#join` in Ruby; `implode` in PHP; `join` in Perl |
|
||||||
|
| [LastIndex](http://golang.org/pkg/strings/#LastIndex) | `str.rindex` in Python; `String#rindex`; `strrpos` in PHP; `rindex` in Perl |
|
||||||
|
| [LastIndexAny](http://golang.org/pkg/strings/#LastIndexAny) | - |
|
||||||
|
| [LastIndexFunc](http://golang.org/pkg/strings/#LastIndexFunc) | - |
|
||||||
|
| [Map](http://golang.org/pkg/strings/#Map) | `String#each_codepoint` in Ruby |
|
||||||
|
| [Repeat](http://golang.org/pkg/strings/#Repeat) | operator `*` in Python and Ruby; `str_repeat` in PHP |
|
||||||
|
| [Replace](http://golang.org/pkg/strings/#Replace) | `str.replace` in Python; `String#sub` in Ruby; `str_replace` in PHP |
|
||||||
|
| [Split](http://golang.org/pkg/strings/#Split) | `str.split` in Python; `String#split` in Ruby; `explode` in PHP; `split` in Perl |
|
||||||
|
| [SplitAfter](http://golang.org/pkg/strings/#SplitAfter) | - |
|
||||||
|
| [SplitAfterN](http://golang.org/pkg/strings/#SplitAfterN) | - |
|
||||||
|
| [SplitN](http://golang.org/pkg/strings/#SplitN) | `str.split` in Python; `String#split` in Ruby; `explode` in PHP; `split` in Perl |
|
||||||
|
| [Title](http://golang.org/pkg/strings/#Title) | `str.title` in Python |
|
||||||
|
| [ToLower](http://golang.org/pkg/strings/#ToLower) | `str.lower` in Python; `String#downcase` in Ruby; `strtolower` in PHP; `lc` in Perl |
|
||||||
|
| [ToLowerSpecial](http://golang.org/pkg/strings/#ToLowerSpecial) | - |
|
||||||
|
| [ToTitle](http://golang.org/pkg/strings/#ToTitle) | - |
|
||||||
|
| [ToTitleSpecial](http://golang.org/pkg/strings/#ToTitleSpecial) | - |
|
||||||
|
| [ToUpper](http://golang.org/pkg/strings/#ToUpper) | `str.upper` in Python; `String#upcase` in Ruby; `strtoupper` in PHP; `uc` in Perl |
|
||||||
|
| [ToUpperSpecial](http://golang.org/pkg/strings/#ToUpperSpecial) | - |
|
||||||
|
| [Trim](http://golang.org/pkg/strings/#Trim) | `str.strip` in Python; `String#strip` in Ruby; `trim` in PHP |
|
||||||
|
| [TrimFunc](http://golang.org/pkg/strings/#TrimFunc) | - |
|
||||||
|
| [TrimLeft](http://golang.org/pkg/strings/#TrimLeft) | `str.lstrip` in Python; `String#lstrip` in Ruby; `ltrim` in PHP |
|
||||||
|
| [TrimLeftFunc](http://golang.org/pkg/strings/#TrimLeftFunc) | - |
|
||||||
|
| [TrimPrefix](http://golang.org/pkg/strings/#TrimPrefix) | - |
|
||||||
|
| [TrimRight](http://golang.org/pkg/strings/#TrimRight) | `str.rstrip` in Python; `String#rstrip` in Ruby; `rtrim` in PHP |
|
||||||
|
| [TrimRightFunc](http://golang.org/pkg/strings/#TrimRightFunc) | - |
|
||||||
|
| [TrimSpace](http://golang.org/pkg/strings/#TrimSpace) | `str.strip` in Python; `String#strip` in Ruby; `trim` in PHP |
|
||||||
|
| [TrimSuffix](http://golang.org/pkg/strings/#TrimSuffix) | `String#chomp` in Ruby; `chomp` in Perl |
|
||||||
|
|
||||||
|
## License ##
|
||||||
|
|
||||||
|
This library is licensed under MIT license. See LICENSE for details.
|
25
vendor/github.com/huandu/xstrings/common.go
generated
vendored
Normal file
25
vendor/github.com/huandu/xstrings/common.go
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package xstrings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
)
|
||||||
|
|
||||||
|
const _BUFFER_INIT_GROW_SIZE_MAX = 2048
|
||||||
|
|
||||||
|
// Lazy initialize a buffer.
|
||||||
|
func allocBuffer(orig, cur string) *bytes.Buffer {
|
||||||
|
output := &bytes.Buffer{}
|
||||||
|
maxSize := len(orig) * 4
|
||||||
|
|
||||||
|
// Avoid to reserve too much memory at once.
|
||||||
|
if maxSize > _BUFFER_INIT_GROW_SIZE_MAX {
|
||||||
|
maxSize = _BUFFER_INIT_GROW_SIZE_MAX
|
||||||
|
}
|
||||||
|
|
||||||
|
output.Grow(maxSize)
|
||||||
|
output.WriteString(orig[:len(orig)-len(cur)])
|
||||||
|
return output
|
||||||
|
}
|
357
vendor/github.com/huandu/xstrings/convert.go
generated
vendored
Normal file
357
vendor/github.com/huandu/xstrings/convert.go
generated
vendored
Normal file
@ -0,0 +1,357 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package xstrings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"math/rand"
|
||||||
|
"unicode"
|
||||||
|
"unicode/utf8"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ToCamelCase can convert all lower case characters behind underscores
|
||||||
|
// to upper case character.
|
||||||
|
// Underscore character will be removed in result except following cases.
|
||||||
|
// * More than 1 underscore.
|
||||||
|
// "a__b" => "A_B"
|
||||||
|
// * At the beginning of string.
|
||||||
|
// "_a" => "_A"
|
||||||
|
// * At the end of string.
|
||||||
|
// "ab_" => "Ab_"
|
||||||
|
func ToCamelCase(str string) string {
|
||||||
|
if len(str) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
buf := &bytes.Buffer{}
|
||||||
|
var r0, r1 rune
|
||||||
|
var size int
|
||||||
|
|
||||||
|
// leading '_' will appear in output.
|
||||||
|
for len(str) > 0 {
|
||||||
|
r0, size = utf8.DecodeRuneInString(str)
|
||||||
|
str = str[size:]
|
||||||
|
|
||||||
|
if r0 != '_' {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
buf.WriteRune(r0)
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(str) == 0 {
|
||||||
|
return buf.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
buf.WriteRune(unicode.ToUpper(r0))
|
||||||
|
r0, size = utf8.DecodeRuneInString(str)
|
||||||
|
str = str[size:]
|
||||||
|
|
||||||
|
for len(str) > 0 {
|
||||||
|
r1 = r0
|
||||||
|
r0, size = utf8.DecodeRuneInString(str)
|
||||||
|
str = str[size:]
|
||||||
|
|
||||||
|
if r1 == '_' && r0 != '_' {
|
||||||
|
r0 = unicode.ToUpper(r0)
|
||||||
|
} else {
|
||||||
|
buf.WriteRune(r1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buf.WriteRune(r0)
|
||||||
|
return buf.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToSnakeCase can convert all upper case characters in a string to
|
||||||
|
// underscore format.
|
||||||
|
//
|
||||||
|
// Some samples.
|
||||||
|
// "FirstName" => "first_name"
|
||||||
|
// "HTTPServer" => "http_server"
|
||||||
|
// "NoHTTPS" => "no_https"
|
||||||
|
// "GO_PATH" => "go_path"
|
||||||
|
// "GO PATH" => "go_path" // space is converted to underscore.
|
||||||
|
// "GO-PATH" => "go_path" // hyphen is converted to underscore.
|
||||||
|
func ToSnakeCase(str string) string {
|
||||||
|
if len(str) == 0 {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
buf := &bytes.Buffer{}
|
||||||
|
var prev, r0, r1 rune
|
||||||
|
var size int
|
||||||
|
|
||||||
|
r0 = '_'
|
||||||
|
|
||||||
|
for len(str) > 0 {
|
||||||
|
prev = r0
|
||||||
|
r0, size = utf8.DecodeRuneInString(str)
|
||||||
|
str = str[size:]
|
||||||
|
|
||||||
|
switch {
|
||||||
|
case r0 == utf8.RuneError:
|
||||||
|
buf.WriteByte(byte(str[0]))
|
||||||
|
|
||||||
|
case unicode.IsUpper(r0):
|
||||||
|
if prev != '_' {
|
||||||
|
buf.WriteRune('_')
|
||||||
|
}
|
||||||
|
|
||||||
|
buf.WriteRune(unicode.ToLower(r0))
|
||||||
|
|
||||||
|
if len(str) == 0 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
r0, size = utf8.DecodeRuneInString(str)
|
||||||
|
str = str[size:]
|
||||||
|
|
||||||
|
if !unicode.IsUpper(r0) {
|
||||||
|
buf.WriteRune(r0)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
// find next non-upper-case character and insert `_` properly.
|
||||||
|
// it's designed to convert `HTTPServer` to `http_server`.
|
||||||
|
// if there are more than 2 adjacent upper case characters in a word,
|
||||||
|
// treat them as an abbreviation plus a normal word.
|
||||||
|
for len(str) > 0 {
|
||||||
|
r1 = r0
|
||||||
|
r0, size = utf8.DecodeRuneInString(str)
|
||||||
|
str = str[size:]
|
||||||
|
|
||||||
|
if r0 == utf8.RuneError {
|
||||||
|
buf.WriteRune(unicode.ToLower(r1))
|
||||||
|
buf.WriteByte(byte(str[0]))
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
if !unicode.IsUpper(r0) {
|
||||||
|
if r0 == '_' || r0 == ' ' || r0 == '-' {
|
||||||
|
r0 = '_'
|
||||||
|
|
||||||
|
buf.WriteRune(unicode.ToLower(r1))
|
||||||
|
} else {
|
||||||
|
buf.WriteRune('_')
|
||||||
|
buf.WriteRune(unicode.ToLower(r1))
|
||||||
|
buf.WriteRune(r0)
|
||||||
|
}
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
buf.WriteRune(unicode.ToLower(r1))
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(str) == 0 || r0 == '_' {
|
||||||
|
buf.WriteRune(unicode.ToLower(r0))
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
if r0 == ' ' || r0 == '-' {
|
||||||
|
r0 = '_'
|
||||||
|
}
|
||||||
|
|
||||||
|
buf.WriteRune(r0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return buf.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// SwapCase will swap characters case from upper to lower or lower to upper.
|
||||||
|
func SwapCase(str string) string {
|
||||||
|
var r rune
|
||||||
|
var size int
|
||||||
|
|
||||||
|
buf := &bytes.Buffer{}
|
||||||
|
|
||||||
|
for len(str) > 0 {
|
||||||
|
r, size = utf8.DecodeRuneInString(str)
|
||||||
|
|
||||||
|
switch {
|
||||||
|
case unicode.IsUpper(r):
|
||||||
|
buf.WriteRune(unicode.ToLower(r))
|
||||||
|
|
||||||
|
case unicode.IsLower(r):
|
||||||
|
buf.WriteRune(unicode.ToUpper(r))
|
||||||
|
|
||||||
|
default:
|
||||||
|
buf.WriteRune(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
str = str[size:]
|
||||||
|
}
|
||||||
|
|
||||||
|
return buf.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FirstRuneToUpper converts first rune to upper case if necessary.
|
||||||
|
func FirstRuneToUpper(str string) string {
|
||||||
|
if str == "" {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
r, size := utf8.DecodeRuneInString(str)
|
||||||
|
|
||||||
|
if !unicode.IsLower(r) {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
buf := &bytes.Buffer{}
|
||||||
|
buf.WriteRune(unicode.ToUpper(r))
|
||||||
|
buf.WriteString(str[size:])
|
||||||
|
return buf.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// FirstRuneToLower converts first rune to lower case if necessary.
|
||||||
|
func FirstRuneToLower(str string) string {
|
||||||
|
if str == "" {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
r, size := utf8.DecodeRuneInString(str)
|
||||||
|
|
||||||
|
if !unicode.IsUpper(r) {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
buf := &bytes.Buffer{}
|
||||||
|
buf.WriteRune(unicode.ToLower(r))
|
||||||
|
buf.WriteString(str[size:])
|
||||||
|
return buf.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Shuffle randomizes runes in a string and returns the result.
|
||||||
|
// It uses default random source in `math/rand`.
|
||||||
|
func Shuffle(str string) string {
|
||||||
|
if str == "" {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
runes := []rune(str)
|
||||||
|
index := 0
|
||||||
|
|
||||||
|
for i := len(runes) - 1; i > 0; i-- {
|
||||||
|
index = rand.Intn(i + 1)
|
||||||
|
|
||||||
|
if i != index {
|
||||||
|
runes[i], runes[index] = runes[index], runes[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return string(runes)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ShuffleSource randomizes runes in a string with given random source.
|
||||||
|
func ShuffleSource(str string, src rand.Source) string {
|
||||||
|
if str == "" {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
runes := []rune(str)
|
||||||
|
index := 0
|
||||||
|
r := rand.New(src)
|
||||||
|
|
||||||
|
for i := len(runes) - 1; i > 0; i-- {
|
||||||
|
index = r.Intn(i + 1)
|
||||||
|
|
||||||
|
if i != index {
|
||||||
|
runes[i], runes[index] = runes[index], runes[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return string(runes)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Successor returns the successor to string.
|
||||||
|
//
|
||||||
|
// If there is one alphanumeric rune is found in string, increase the rune by 1.
|
||||||
|
// If increment generates a "carry", the rune to the left of it is incremented.
|
||||||
|
// This process repeats until there is no carry, adding an additional rune if necessary.
|
||||||
|
//
|
||||||
|
// If there is no alphanumeric rune, the rightmost rune will be increased by 1
|
||||||
|
// regardless whether the result is a valid rune or not.
|
||||||
|
//
|
||||||
|
// Only following characters are alphanumeric.
|
||||||
|
// * a - z
|
||||||
|
// * A - Z
|
||||||
|
// * 0 - 9
|
||||||
|
//
|
||||||
|
// Samples (borrowed from ruby's String#succ document):
|
||||||
|
// "abcd" => "abce"
|
||||||
|
// "THX1138" => "THX1139"
|
||||||
|
// "<<koala>>" => "<<koalb>>"
|
||||||
|
// "1999zzz" => "2000aaa"
|
||||||
|
// "ZZZ9999" => "AAAA0000"
|
||||||
|
// "***" => "**+"
|
||||||
|
func Successor(str string) string {
|
||||||
|
if str == "" {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
var r rune
|
||||||
|
var i int
|
||||||
|
carry := ' '
|
||||||
|
runes := []rune(str)
|
||||||
|
l := len(runes)
|
||||||
|
lastAlphanumeric := l
|
||||||
|
|
||||||
|
for i = l - 1; i >= 0; i-- {
|
||||||
|
r = runes[i]
|
||||||
|
|
||||||
|
if ('a' <= r && r <= 'y') ||
|
||||||
|
('A' <= r && r <= 'Y') ||
|
||||||
|
('0' <= r && r <= '8') {
|
||||||
|
runes[i]++
|
||||||
|
carry = ' '
|
||||||
|
lastAlphanumeric = i
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
switch r {
|
||||||
|
case 'z':
|
||||||
|
runes[i] = 'a'
|
||||||
|
carry = 'a'
|
||||||
|
lastAlphanumeric = i
|
||||||
|
|
||||||
|
case 'Z':
|
||||||
|
runes[i] = 'A'
|
||||||
|
carry = 'A'
|
||||||
|
lastAlphanumeric = i
|
||||||
|
|
||||||
|
case '9':
|
||||||
|
runes[i] = '0'
|
||||||
|
carry = '0'
|
||||||
|
lastAlphanumeric = i
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Needs to add one character for carry.
|
||||||
|
if i < 0 && carry != ' ' {
|
||||||
|
buf := &bytes.Buffer{}
|
||||||
|
buf.Grow(l + 4) // Reserve enough space for write.
|
||||||
|
|
||||||
|
if lastAlphanumeric != 0 {
|
||||||
|
buf.WriteString(str[:lastAlphanumeric])
|
||||||
|
}
|
||||||
|
|
||||||
|
buf.WriteRune(carry)
|
||||||
|
|
||||||
|
for _, r = range runes[lastAlphanumeric:] {
|
||||||
|
buf.WriteRune(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
return buf.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// No alphanumeric character. Simply increase last rune's value.
|
||||||
|
if lastAlphanumeric == l {
|
||||||
|
runes[l-1]++
|
||||||
|
}
|
||||||
|
|
||||||
|
return string(runes)
|
||||||
|
}
|
163
vendor/github.com/huandu/xstrings/convert_test.go
generated
vendored
Normal file
163
vendor/github.com/huandu/xstrings/convert_test.go
generated
vendored
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package xstrings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"sort"
|
||||||
|
"strings"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestToSnakeCase(t *testing.T) {
|
||||||
|
runTestCases(t, ToSnakeCase, _M{
|
||||||
|
"HTTPServer": "http_server",
|
||||||
|
"_camelCase": "_camel_case",
|
||||||
|
"NoHTTPS": "no_https",
|
||||||
|
"Wi_thF": "wi_th_f",
|
||||||
|
"_AnotherTES_TCaseP": "_another_tes_t_case_p",
|
||||||
|
"ALL": "all",
|
||||||
|
"_HELLO_WORLD_": "_hello_world_",
|
||||||
|
"HELLO_WORLD": "hello_world",
|
||||||
|
"HELLO____WORLD": "hello____world",
|
||||||
|
"TW": "tw",
|
||||||
|
"_C": "_c",
|
||||||
|
|
||||||
|
" sentence case ": "__sentence_case__",
|
||||||
|
" Mixed-hyphen case _and SENTENCE_case and UPPER-case": "_mixed_hyphen_case__and_sentence_case_and_upper_case",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestToCamelCase(t *testing.T) {
|
||||||
|
runTestCases(t, ToCamelCase, _M{
|
||||||
|
"http_server": "HttpServer",
|
||||||
|
"_camel_case": "_CamelCase",
|
||||||
|
"no_https": "NoHttps",
|
||||||
|
"_complex__case_": "_Complex_Case_",
|
||||||
|
"all": "All",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestSwapCase(t *testing.T) {
|
||||||
|
runTestCases(t, SwapCase, _M{
|
||||||
|
"swapCase": "SWAPcASE",
|
||||||
|
"Θ~λa云Ξπ": "θ~ΛA云ξΠ",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestFirstRuneToUpper(t *testing.T) {
|
||||||
|
runTestCases(t, FirstRuneToUpper, _M{
|
||||||
|
"hello, world!": "Hello, world!",
|
||||||
|
"Hello, world!": "Hello, world!",
|
||||||
|
"你好,世界!": "你好,世界!",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestFirstRuneToLower(t *testing.T) {
|
||||||
|
runTestCases(t, FirstRuneToLower, _M{
|
||||||
|
"hello, world!": "hello, world!",
|
||||||
|
"Hello, world!": "hello, world!",
|
||||||
|
"你好,世界!": "你好,世界!",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestShuffle(t *testing.T) {
|
||||||
|
// It seems there is no reliable way to test shuffled string.
|
||||||
|
// Runner just make sure shuffled string has the same runes as origin string.
|
||||||
|
runner := func(str string) string {
|
||||||
|
s := Shuffle(str)
|
||||||
|
slice := sort.StringSlice(strings.Split(s, ""))
|
||||||
|
slice.Sort()
|
||||||
|
return strings.Join(slice, "")
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
"": "",
|
||||||
|
"facgbheidjk": "abcdefghijk",
|
||||||
|
"尝试中文": "中尝文试",
|
||||||
|
"zh英文hun排": "hhnuz排文英",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
type testShuffleSource int
|
||||||
|
|
||||||
|
// A generated random number sequance just for testing.
|
||||||
|
var testShuffleTable = []int64{
|
||||||
|
1874068156324778273,
|
||||||
|
3328451335138149956,
|
||||||
|
5263531936693774911,
|
||||||
|
7955079406183515637,
|
||||||
|
2703501726821866378,
|
||||||
|
2740103009342231109,
|
||||||
|
6941261091797652072,
|
||||||
|
1905388747193831650,
|
||||||
|
7981306761429961588,
|
||||||
|
6426100070888298971,
|
||||||
|
4831389563158288344,
|
||||||
|
261049867304784443,
|
||||||
|
1460320609597786623,
|
||||||
|
5600924393587988459,
|
||||||
|
8995016276575641803,
|
||||||
|
732830328053361739,
|
||||||
|
5486140987150761883,
|
||||||
|
545291762129038907,
|
||||||
|
6382800227808658932,
|
||||||
|
2781055864473387780,
|
||||||
|
1598098976185383115,
|
||||||
|
4990765271833742716,
|
||||||
|
5018949295715050020,
|
||||||
|
2568779411109623071,
|
||||||
|
3902890183311134652,
|
||||||
|
4893789450120281907,
|
||||||
|
2338498362660772719,
|
||||||
|
2601737961087659062,
|
||||||
|
7273596521315663110,
|
||||||
|
3337066551442961397,
|
||||||
|
8121576815539813105,
|
||||||
|
2740376916591569721,
|
||||||
|
8249030965139585917,
|
||||||
|
898860202204764712,
|
||||||
|
9010467728050264449,
|
||||||
|
685213522303989579,
|
||||||
|
2050257992909156333,
|
||||||
|
6281838661429879825,
|
||||||
|
2227583514184312746,
|
||||||
|
2873287401706343734,
|
||||||
|
}
|
||||||
|
|
||||||
|
func (src testShuffleSource) Int63() int64 {
|
||||||
|
n := testShuffleTable[int(src)%len(testShuffleTable)]
|
||||||
|
src++
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (src testShuffleSource) Seed(int64) {}
|
||||||
|
|
||||||
|
func TestShuffleSource(t *testing.T) {
|
||||||
|
var src testShuffleSource
|
||||||
|
runner := func(str string) string {
|
||||||
|
return ShuffleSource(str, src)
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
"": "",
|
||||||
|
"facgbheidjk": "bakefjgichd",
|
||||||
|
"尝试中文怎么样": "怎试中样尝么文",
|
||||||
|
"zh英文hun排": "hh英nzu文排",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestSuccessor(t *testing.T) {
|
||||||
|
runTestCases(t, Successor, _M{
|
||||||
|
"": "",
|
||||||
|
"abcd": "abce",
|
||||||
|
"THX1138": "THX1139",
|
||||||
|
"<<koala>>": "<<koalb>>",
|
||||||
|
"1999zzz": "2000aaa",
|
||||||
|
"ZZZ9999": "AAAA0000",
|
||||||
|
"***": "**+",
|
||||||
|
|
||||||
|
"来点中文试试": "来点中文试诖",
|
||||||
|
"中cZ英ZZ文zZ混9zZ9杂99进z位": "中dA英AA文aA混0aA0杂00进a位",
|
||||||
|
})
|
||||||
|
}
|
120
vendor/github.com/huandu/xstrings/count.go
generated
vendored
Normal file
120
vendor/github.com/huandu/xstrings/count.go
generated
vendored
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package xstrings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"unicode"
|
||||||
|
"unicode/utf8"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Get str's utf8 rune length.
|
||||||
|
func Len(str string) int {
|
||||||
|
return utf8.RuneCountInString(str)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Count number of words in a string.
|
||||||
|
//
|
||||||
|
// Word is defined as a locale dependent string containing alphabetic characters,
|
||||||
|
// which may also contain but not start with `'` and `-` characters.
|
||||||
|
func WordCount(str string) int {
|
||||||
|
var r rune
|
||||||
|
var size, n int
|
||||||
|
|
||||||
|
inWord := false
|
||||||
|
|
||||||
|
for len(str) > 0 {
|
||||||
|
r, size = utf8.DecodeRuneInString(str)
|
||||||
|
|
||||||
|
switch {
|
||||||
|
case isAlphabet(r):
|
||||||
|
if !inWord {
|
||||||
|
inWord = true
|
||||||
|
n++
|
||||||
|
}
|
||||||
|
|
||||||
|
case inWord && (r == '\'' || r == '-'):
|
||||||
|
// Still in word.
|
||||||
|
|
||||||
|
default:
|
||||||
|
inWord = false
|
||||||
|
}
|
||||||
|
|
||||||
|
str = str[size:]
|
||||||
|
}
|
||||||
|
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
const minCJKCharacter = '\u3400'
|
||||||
|
|
||||||
|
// Checks r is a letter but not CJK character.
|
||||||
|
func isAlphabet(r rune) bool {
|
||||||
|
if !unicode.IsLetter(r) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
switch {
|
||||||
|
// Quick check for non-CJK character.
|
||||||
|
case r < minCJKCharacter:
|
||||||
|
return true
|
||||||
|
|
||||||
|
// Common CJK characters.
|
||||||
|
case r >= '\u4E00' && r <= '\u9FCC':
|
||||||
|
return false
|
||||||
|
|
||||||
|
// Rare CJK characters.
|
||||||
|
case r >= '\u3400' && r <= '\u4D85':
|
||||||
|
return false
|
||||||
|
|
||||||
|
// Rare and historic CJK characters.
|
||||||
|
case r >= '\U00020000' && r <= '\U0002B81D':
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Width returns string width in monotype font.
|
||||||
|
// Multi-byte characters are usually twice the width of single byte characters.
|
||||||
|
//
|
||||||
|
// Algorithm comes from `mb_strwidth` in PHP.
|
||||||
|
// http://php.net/manual/en/function.mb-strwidth.php
|
||||||
|
func Width(str string) int {
|
||||||
|
var r rune
|
||||||
|
var size, n int
|
||||||
|
|
||||||
|
for len(str) > 0 {
|
||||||
|
r, size = utf8.DecodeRuneInString(str)
|
||||||
|
n += RuneWidth(r)
|
||||||
|
str = str[size:]
|
||||||
|
}
|
||||||
|
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
// RuneWidth returns character width in monotype font.
|
||||||
|
// Multi-byte characters are usually twice the width of single byte characters.
|
||||||
|
//
|
||||||
|
// Algorithm comes from `mb_strwidth` in PHP.
|
||||||
|
// http://php.net/manual/en/function.mb-strwidth.php
|
||||||
|
func RuneWidth(r rune) int {
|
||||||
|
switch {
|
||||||
|
case r == utf8.RuneError || r < '\x20':
|
||||||
|
return 0
|
||||||
|
|
||||||
|
case '\x20' <= r && r < '\u2000':
|
||||||
|
return 1
|
||||||
|
|
||||||
|
case '\u2000' <= r && r < '\uFF61':
|
||||||
|
return 2
|
||||||
|
|
||||||
|
case '\uFF61' <= r && r < '\uFFA0':
|
||||||
|
return 1
|
||||||
|
|
||||||
|
case '\uFFA0' <= r:
|
||||||
|
return 2
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
62
vendor/github.com/huandu/xstrings/count_test.go
generated
vendored
Normal file
62
vendor/github.com/huandu/xstrings/count_test.go
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package xstrings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestLen(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
return fmt.Sprint(Len(str))
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
"abcdef": "6",
|
||||||
|
"中文": "2",
|
||||||
|
"中yin文hun排": "9",
|
||||||
|
"": "0",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestWordCount(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
return fmt.Sprint(WordCount(str))
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
"one word: λ": "3",
|
||||||
|
"中文": "0",
|
||||||
|
"你好,sekai!": "1",
|
||||||
|
"oh, it's super-fancy!!a": "4",
|
||||||
|
"": "0",
|
||||||
|
"-": "0",
|
||||||
|
"it's-'s": "1",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestWidth(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
return fmt.Sprint(Width(str))
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
"abcd\t0123\n7890": "12",
|
||||||
|
"中zh英eng文混排": "15",
|
||||||
|
"": "0",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestRuneWidth(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
return fmt.Sprint(RuneWidth([]rune(str)[0]))
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
"a": "1",
|
||||||
|
"中": "2",
|
||||||
|
"\x11": "0",
|
||||||
|
})
|
||||||
|
}
|
8
vendor/github.com/huandu/xstrings/doc.go
generated
vendored
Normal file
8
vendor/github.com/huandu/xstrings/doc.go
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Package `xstrings` is to provide string algorithms which are useful but not included in `strings` package.
|
||||||
|
// See project home page for details. https://github.com/huandu/xstrings
|
||||||
|
//
|
||||||
|
// Package `xstrings` assumes all strings are encoded in utf8.
|
||||||
|
package xstrings
|
170
vendor/github.com/huandu/xstrings/format.go
generated
vendored
Normal file
170
vendor/github.com/huandu/xstrings/format.go
generated
vendored
Normal file
@ -0,0 +1,170 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package xstrings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"unicode/utf8"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ExpandTabs can expand tabs ('\t') rune in str to one or more spaces dpending on
|
||||||
|
// current column and tabSize.
|
||||||
|
// The column number is reset to zero after each newline ('\n') occurring in the str.
|
||||||
|
//
|
||||||
|
// ExpandTabs uses RuneWidth to decide rune's width.
|
||||||
|
// For example, CJK characters will be treated as two characters.
|
||||||
|
//
|
||||||
|
// If tabSize <= 0, ExpandTabs panics with error.
|
||||||
|
//
|
||||||
|
// Samples:
|
||||||
|
// ExpandTabs("a\tbc\tdef\tghij\tk", 4) => "a bc def ghij k"
|
||||||
|
// ExpandTabs("abcdefg\thij\nk\tl", 4) => "abcdefg hij\nk l"
|
||||||
|
// ExpandTabs("z中\t文\tw", 4) => "z中 文 w"
|
||||||
|
func ExpandTabs(str string, tabSize int) string {
|
||||||
|
if tabSize <= 0 {
|
||||||
|
panic("tab size must be positive")
|
||||||
|
}
|
||||||
|
|
||||||
|
var r rune
|
||||||
|
var i, size, column, expand int
|
||||||
|
var output *bytes.Buffer
|
||||||
|
|
||||||
|
orig := str
|
||||||
|
|
||||||
|
for len(str) > 0 {
|
||||||
|
r, size = utf8.DecodeRuneInString(str)
|
||||||
|
|
||||||
|
if r == '\t' {
|
||||||
|
expand = tabSize - column%tabSize
|
||||||
|
|
||||||
|
if output == nil {
|
||||||
|
output = allocBuffer(orig, str)
|
||||||
|
}
|
||||||
|
|
||||||
|
for i = 0; i < expand; i++ {
|
||||||
|
output.WriteByte(byte(' '))
|
||||||
|
}
|
||||||
|
|
||||||
|
column += expand
|
||||||
|
} else {
|
||||||
|
if r == '\n' {
|
||||||
|
column = 0
|
||||||
|
} else {
|
||||||
|
column += RuneWidth(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
if output != nil {
|
||||||
|
output.WriteRune(r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
str = str[size:]
|
||||||
|
}
|
||||||
|
|
||||||
|
if output == nil {
|
||||||
|
return orig
|
||||||
|
}
|
||||||
|
|
||||||
|
return output.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// LeftJustify returns a string with pad string at right side if str's rune length is smaller than length.
|
||||||
|
// If str's rune length is larger than length, str itself will be returned.
|
||||||
|
//
|
||||||
|
// If pad is an empty string, str will be returned.
|
||||||
|
//
|
||||||
|
// Samples:
|
||||||
|
// LeftJustify("hello", 4, " ") => "hello"
|
||||||
|
// LeftJustify("hello", 10, " ") => "hello "
|
||||||
|
// LeftJustify("hello", 10, "123") => "hello12312"
|
||||||
|
func LeftJustify(str string, length int, pad string) string {
|
||||||
|
l := Len(str)
|
||||||
|
|
||||||
|
if l >= length || pad == "" {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
remains := length - l
|
||||||
|
padLen := Len(pad)
|
||||||
|
|
||||||
|
output := &bytes.Buffer{}
|
||||||
|
output.Grow(len(str) + (remains/padLen+1)*len(pad))
|
||||||
|
output.WriteString(str)
|
||||||
|
writePadString(output, pad, padLen, remains)
|
||||||
|
return output.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// RightJustify returns a string with pad string at left side if str's rune length is smaller than length.
|
||||||
|
// If str's rune length is larger than length, str itself will be returned.
|
||||||
|
//
|
||||||
|
// If pad is an empty string, str will be returned.
|
||||||
|
//
|
||||||
|
// Samples:
|
||||||
|
// RightJustify("hello", 4, " ") => "hello"
|
||||||
|
// RightJustify("hello", 10, " ") => " hello"
|
||||||
|
// RightJustify("hello", 10, "123") => "12312hello"
|
||||||
|
func RightJustify(str string, length int, pad string) string {
|
||||||
|
l := Len(str)
|
||||||
|
|
||||||
|
if l >= length || pad == "" {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
remains := length - l
|
||||||
|
padLen := Len(pad)
|
||||||
|
|
||||||
|
output := &bytes.Buffer{}
|
||||||
|
output.Grow(len(str) + (remains/padLen+1)*len(pad))
|
||||||
|
writePadString(output, pad, padLen, remains)
|
||||||
|
output.WriteString(str)
|
||||||
|
return output.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Center returns a string with pad string at both side if str's rune length is smaller than length.
|
||||||
|
// If str's rune length is larger than length, str itself will be returned.
|
||||||
|
//
|
||||||
|
// If pad is an empty string, str will be returned.
|
||||||
|
//
|
||||||
|
// Samples:
|
||||||
|
// Center("hello", 4, " ") => "hello"
|
||||||
|
// Center("hello", 10, " ") => " hello "
|
||||||
|
// Center("hello", 10, "123") => "12hello123"
|
||||||
|
func Center(str string, length int, pad string) string {
|
||||||
|
l := Len(str)
|
||||||
|
|
||||||
|
if l >= length || pad == "" {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
remains := length - l
|
||||||
|
padLen := Len(pad)
|
||||||
|
|
||||||
|
output := &bytes.Buffer{}
|
||||||
|
output.Grow(len(str) + (remains/padLen+1)*len(pad))
|
||||||
|
writePadString(output, pad, padLen, remains/2)
|
||||||
|
output.WriteString(str)
|
||||||
|
writePadString(output, pad, padLen, (remains+1)/2)
|
||||||
|
return output.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
func writePadString(output *bytes.Buffer, pad string, padLen, remains int) {
|
||||||
|
var r rune
|
||||||
|
var size int
|
||||||
|
|
||||||
|
repeats := remains / padLen
|
||||||
|
|
||||||
|
for i := 0; i < repeats; i++ {
|
||||||
|
output.WriteString(pad)
|
||||||
|
}
|
||||||
|
|
||||||
|
remains = remains % padLen
|
||||||
|
|
||||||
|
if remains != 0 {
|
||||||
|
for i := 0; i < remains; i++ {
|
||||||
|
r, size = utf8.DecodeRuneInString(pad)
|
||||||
|
output.WriteRune(r)
|
||||||
|
pad = pad[size:]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
100
vendor/github.com/huandu/xstrings/format_test.go
generated
vendored
Normal file
100
vendor/github.com/huandu/xstrings/format_test.go
generated
vendored
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package xstrings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestExpandTabs(t *testing.T) {
|
||||||
|
runner := func(str string) (result string) {
|
||||||
|
defer func() {
|
||||||
|
if e := recover(); e != nil {
|
||||||
|
result = e.(string)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
input := strings.Split(str, separator)
|
||||||
|
n, _ := strconv.Atoi(input[1])
|
||||||
|
return ExpandTabs(input[0], n)
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("a\tbc\tdef\tghij\tk", "4"): "a bc def ghij k",
|
||||||
|
sep("abcdefg\thij\nk\tl", "4"): "abcdefg hij\nk l",
|
||||||
|
sep("z中\t文\tw", "4"): "z中 文 w",
|
||||||
|
sep("abcdef", "4"): "abcdef",
|
||||||
|
|
||||||
|
sep("abc\td\tef\tghij\nk\tl", "3"): "abc d ef ghij\nk l",
|
||||||
|
sep("abc\td\tef\tghij\nk\tl", "1"): "abc d ef ghij\nk l",
|
||||||
|
|
||||||
|
sep("abc", "0"): "tab size must be positive",
|
||||||
|
sep("abc", "-1"): "tab size must be positive",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestLeftJustify(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
input := strings.Split(str, separator)
|
||||||
|
n, _ := strconv.Atoi(input[1])
|
||||||
|
return LeftJustify(input[0], n, input[2])
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("hello", "4", " "): "hello",
|
||||||
|
sep("hello", "10", " "): "hello ",
|
||||||
|
sep("hello", "10", "123"): "hello12312",
|
||||||
|
|
||||||
|
sep("hello中文test", "4", " "): "hello中文test",
|
||||||
|
sep("hello中文test", "12", " "): "hello中文test ",
|
||||||
|
sep("hello中文test", "18", "测试!"): "hello中文test测试!测试!测",
|
||||||
|
|
||||||
|
sep("hello中文test", "0", "123"): "hello中文test",
|
||||||
|
sep("hello中文test", "18", ""): "hello中文test",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestRightJustify(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
input := strings.Split(str, separator)
|
||||||
|
n, _ := strconv.Atoi(input[1])
|
||||||
|
return RightJustify(input[0], n, input[2])
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("hello", "4", " "): "hello",
|
||||||
|
sep("hello", "10", " "): " hello",
|
||||||
|
sep("hello", "10", "123"): "12312hello",
|
||||||
|
|
||||||
|
sep("hello中文test", "4", " "): "hello中文test",
|
||||||
|
sep("hello中文test", "12", " "): " hello中文test",
|
||||||
|
sep("hello中文test", "18", "测试!"): "测试!测试!测hello中文test",
|
||||||
|
|
||||||
|
sep("hello中文test", "0", "123"): "hello中文test",
|
||||||
|
sep("hello中文test", "18", ""): "hello中文test",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestCenter(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
input := strings.Split(str, separator)
|
||||||
|
n, _ := strconv.Atoi(input[1])
|
||||||
|
return Center(input[0], n, input[2])
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("hello", "4", " "): "hello",
|
||||||
|
sep("hello", "10", " "): " hello ",
|
||||||
|
sep("hello", "10", "123"): "12hello123",
|
||||||
|
|
||||||
|
sep("hello中文test", "4", " "): "hello中文test",
|
||||||
|
sep("hello中文test", "12", " "): "hello中文test ",
|
||||||
|
sep("hello中文test", "18", "测试!"): "测试!hello中文test测试!测",
|
||||||
|
|
||||||
|
sep("hello中文test", "0", "123"): "hello中文test",
|
||||||
|
sep("hello中文test", "18", ""): "hello中文test",
|
||||||
|
})
|
||||||
|
}
|
217
vendor/github.com/huandu/xstrings/manipulate.go
generated
vendored
Normal file
217
vendor/github.com/huandu/xstrings/manipulate.go
generated
vendored
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package xstrings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"strings"
|
||||||
|
"unicode/utf8"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Reverse a utf8 encoded string.
|
||||||
|
func Reverse(str string) string {
|
||||||
|
var size int
|
||||||
|
|
||||||
|
tail := len(str)
|
||||||
|
buf := make([]byte, tail)
|
||||||
|
s := buf
|
||||||
|
|
||||||
|
for len(str) > 0 {
|
||||||
|
_, size = utf8.DecodeRuneInString(str)
|
||||||
|
tail -= size
|
||||||
|
s = append(s[:tail], []byte(str[:size])...)
|
||||||
|
str = str[size:]
|
||||||
|
}
|
||||||
|
|
||||||
|
return string(buf)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Slice a string by rune.
|
||||||
|
//
|
||||||
|
// Start must satisfy 0 <= start <= rune length.
|
||||||
|
//
|
||||||
|
// End can be positive, zero or negative.
|
||||||
|
// If end >= 0, start and end must satisfy start <= end <= rune length.
|
||||||
|
// If end < 0, it means slice to the end of string.
|
||||||
|
//
|
||||||
|
// Otherwise, Slice will panic as out of range.
|
||||||
|
func Slice(str string, start, end int) string {
|
||||||
|
var size, startPos, endPos int
|
||||||
|
|
||||||
|
origin := str
|
||||||
|
|
||||||
|
if start < 0 || end > len(str) || (end >= 0 && start > end) {
|
||||||
|
panic("out of range")
|
||||||
|
}
|
||||||
|
|
||||||
|
if end >= 0 {
|
||||||
|
end -= start
|
||||||
|
}
|
||||||
|
|
||||||
|
for start > 0 && len(str) > 0 {
|
||||||
|
_, size = utf8.DecodeRuneInString(str)
|
||||||
|
start--
|
||||||
|
startPos += size
|
||||||
|
str = str[size:]
|
||||||
|
}
|
||||||
|
|
||||||
|
if end < 0 {
|
||||||
|
return origin[startPos:]
|
||||||
|
}
|
||||||
|
|
||||||
|
endPos = startPos
|
||||||
|
|
||||||
|
for end > 0 && len(str) > 0 {
|
||||||
|
_, size = utf8.DecodeRuneInString(str)
|
||||||
|
end--
|
||||||
|
endPos += size
|
||||||
|
str = str[size:]
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(str) == 0 && (start > 0 || end > 0) {
|
||||||
|
panic("out of range")
|
||||||
|
}
|
||||||
|
|
||||||
|
return origin[startPos:endPos]
|
||||||
|
}
|
||||||
|
|
||||||
|
// Partition splits a string by sep into three parts.
|
||||||
|
// The return value is a slice of strings with head, match and tail.
|
||||||
|
//
|
||||||
|
// If str contains sep, for example "hello" and "l", Partition returns
|
||||||
|
// "he", "l", "lo"
|
||||||
|
//
|
||||||
|
// If str doesn't contain sep, for example "hello" and "x", Partition returns
|
||||||
|
// "hello", "", ""
|
||||||
|
func Partition(str, sep string) (head, match, tail string) {
|
||||||
|
index := strings.Index(str, sep)
|
||||||
|
|
||||||
|
if index == -1 {
|
||||||
|
head = str
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
head = str[:index]
|
||||||
|
match = str[index : index+len(sep)]
|
||||||
|
tail = str[index+len(sep):]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// LastPartition splits a string by last instance of sep into three parts.
|
||||||
|
// The return value is a slice of strings with head, match and tail.
|
||||||
|
//
|
||||||
|
// If str contains sep, for example "hello" and "l", LastPartition returns
|
||||||
|
// "hel", "l", "o"
|
||||||
|
//
|
||||||
|
// If str doesn't contain sep, for example "hello" and "x", LastPartition returns
|
||||||
|
// "", "", "hello"
|
||||||
|
func LastPartition(str, sep string) (head, match, tail string) {
|
||||||
|
index := strings.LastIndex(str, sep)
|
||||||
|
|
||||||
|
if index == -1 {
|
||||||
|
tail = str
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
head = str[:index]
|
||||||
|
match = str[index : index+len(sep)]
|
||||||
|
tail = str[index+len(sep):]
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Insert src into dst at given rune index.
|
||||||
|
// Index is counted by runes instead of bytes.
|
||||||
|
//
|
||||||
|
// If index is out of range of dst, panic with out of range.
|
||||||
|
func Insert(dst, src string, index int) string {
|
||||||
|
return Slice(dst, 0, index) + src + Slice(dst, index, -1)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Scrubs invalid utf8 bytes with repl string.
|
||||||
|
// Adjacent invalid bytes are replaced only once.
|
||||||
|
func Scrub(str, repl string) string {
|
||||||
|
var buf *bytes.Buffer
|
||||||
|
var r rune
|
||||||
|
var size, pos int
|
||||||
|
var hasError bool
|
||||||
|
|
||||||
|
origin := str
|
||||||
|
|
||||||
|
for len(str) > 0 {
|
||||||
|
r, size = utf8.DecodeRuneInString(str)
|
||||||
|
|
||||||
|
if r == utf8.RuneError {
|
||||||
|
if !hasError {
|
||||||
|
if buf == nil {
|
||||||
|
buf = &bytes.Buffer{}
|
||||||
|
}
|
||||||
|
|
||||||
|
buf.WriteString(origin[:pos])
|
||||||
|
hasError = true
|
||||||
|
}
|
||||||
|
} else if hasError {
|
||||||
|
hasError = false
|
||||||
|
buf.WriteString(repl)
|
||||||
|
|
||||||
|
origin = origin[pos:]
|
||||||
|
pos = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
pos += size
|
||||||
|
str = str[size:]
|
||||||
|
}
|
||||||
|
|
||||||
|
if buf != nil {
|
||||||
|
buf.WriteString(origin)
|
||||||
|
return buf.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// No invalid byte.
|
||||||
|
return origin
|
||||||
|
}
|
||||||
|
|
||||||
|
// Splits a string into words. Returns a slice of words.
|
||||||
|
// If there is no word in a string, return nil.
|
||||||
|
//
|
||||||
|
// Word is defined as a locale dependent string containing alphabetic characters,
|
||||||
|
// which may also contain but not start with `'` and `-` characters.
|
||||||
|
func WordSplit(str string) []string {
|
||||||
|
var word string
|
||||||
|
var words []string
|
||||||
|
var r rune
|
||||||
|
var size, pos int
|
||||||
|
|
||||||
|
inWord := false
|
||||||
|
|
||||||
|
for len(str) > 0 {
|
||||||
|
r, size = utf8.DecodeRuneInString(str)
|
||||||
|
|
||||||
|
switch {
|
||||||
|
case isAlphabet(r):
|
||||||
|
if !inWord {
|
||||||
|
inWord = true
|
||||||
|
word = str
|
||||||
|
pos = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
case inWord && (r == '\'' || r == '-'):
|
||||||
|
// Still in word.
|
||||||
|
|
||||||
|
default:
|
||||||
|
if inWord {
|
||||||
|
inWord = false
|
||||||
|
words = append(words, word[:pos])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pos += size
|
||||||
|
str = str[size:]
|
||||||
|
}
|
||||||
|
|
||||||
|
if inWord {
|
||||||
|
words = append(words, word[:pos])
|
||||||
|
}
|
||||||
|
|
||||||
|
return words
|
||||||
|
}
|
142
vendor/github.com/huandu/xstrings/manipulate_test.go
generated
vendored
Normal file
142
vendor/github.com/huandu/xstrings/manipulate_test.go
generated
vendored
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package xstrings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestReverse(t *testing.T) {
|
||||||
|
runTestCases(t, Reverse, _M{
|
||||||
|
"reverse string": "gnirts esrever",
|
||||||
|
"中文如何?": "?何如文中",
|
||||||
|
"中en文混~排怎样?a": "a?样怎排~混文ne中",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestSlice(t *testing.T) {
|
||||||
|
runner := func(str string) (result string) {
|
||||||
|
defer func() {
|
||||||
|
if e := recover(); e != nil {
|
||||||
|
result = e.(string)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
strs := split(str)
|
||||||
|
start, _ := strconv.ParseInt(strs[1], 10, 0)
|
||||||
|
end, _ := strconv.ParseInt(strs[2], 10, 0)
|
||||||
|
|
||||||
|
result = Slice(strs[0], int(start), int(end))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("abcdefghijk", "3", "8"): "defgh",
|
||||||
|
sep("来点中文如何?", "2", "7"): "中文如何?",
|
||||||
|
sep("中en文混~排总是少不了的a", "2", "8"): "n文混~排总",
|
||||||
|
sep("中en文混~排总是少不了的a", "0", "0"): "",
|
||||||
|
sep("中en文混~排总是少不了的a", "14", "14"): "",
|
||||||
|
sep("中en文混~排总是少不了的a", "5", "-1"): "~排总是少不了的a",
|
||||||
|
sep("中en文混~排总是少不了的a", "14", "-1"): "",
|
||||||
|
|
||||||
|
sep("let us slice out of range", "-3", "3"): "out of range",
|
||||||
|
sep("超出范围哦", "2", "6"): "out of range",
|
||||||
|
sep("don't do this", "3", "2"): "out of range",
|
||||||
|
sep("千gan万de不piao要liang", "19", "19"): "out of range",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPartition(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
input := strings.Split(str, separator)
|
||||||
|
head, match, tail := Partition(input[0], input[1])
|
||||||
|
return sep(head, match, tail)
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("hello", "l"): sep("he", "l", "lo"),
|
||||||
|
sep("中文总少不了", "少"): sep("中文总", "少", "不了"),
|
||||||
|
sep("z这个zh英文混排hao不", "h英文"): sep("z这个z", "h英文", "混排hao不"),
|
||||||
|
sep("边界tiao件zen能忘", "边界"): sep("", "边界", "tiao件zen能忘"),
|
||||||
|
sep("尾巴ye别忘le", "忘le"): sep("尾巴ye别", "忘le", ""),
|
||||||
|
|
||||||
|
sep("hello", "x"): sep("hello", "", ""),
|
||||||
|
sep("不是晩香玉", "晚"): sep("不是晩香玉", "", ""), // Hint: 晩 is not 晚 :)
|
||||||
|
sep("来ge混排ba", "e 混"): sep("来ge混排ba", "", ""),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestLastPartition(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
input := strings.Split(str, separator)
|
||||||
|
head, match, tail := LastPartition(input[0], input[1])
|
||||||
|
return sep(head, match, tail)
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("hello", "l"): sep("hel", "l", "o"),
|
||||||
|
sep("少量中文总少不了", "少"): sep("少量中文总", "少", "不了"),
|
||||||
|
sep("z这个zh英文ch英文混排hao不", "h英文"): sep("z这个zh英文c", "h英文", "混排hao不"),
|
||||||
|
sep("边界tiao件zen能忘边界", "边界"): sep("边界tiao件zen能忘", "边界", ""),
|
||||||
|
sep("尾巴ye别忘le", "尾巴"): sep("", "尾巴", "ye别忘le"),
|
||||||
|
|
||||||
|
sep("hello", "x"): sep("", "", "hello"),
|
||||||
|
sep("不是晩香玉", "晚"): sep("", "", "不是晩香玉"), // Hint: 晩 is not 晚 :)
|
||||||
|
sep("来ge混排ba", "e 混"): sep("", "", "来ge混排ba"),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestInsert(t *testing.T) {
|
||||||
|
runner := func(str string) (result string) {
|
||||||
|
defer func() {
|
||||||
|
if e := recover(); e != nil {
|
||||||
|
result = e.(string)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
strs := split(str)
|
||||||
|
index, _ := strconv.ParseInt(strs[2], 10, 0)
|
||||||
|
result = Insert(strs[0], strs[1], int(index))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("abcdefg", "hi", "3"): "abchidefg",
|
||||||
|
sep("少量中文是必须的", "混pai", "4"): "少量中文混pai是必须的",
|
||||||
|
sep("zh英文hun排", "~!", "5"): "zh英文h~!un排",
|
||||||
|
sep("插在begining", "我", "0"): "我插在begining",
|
||||||
|
sep("插在ending", "我", "8"): "插在ending我",
|
||||||
|
|
||||||
|
sep("超tian出yuan边tu界po", "foo", "-1"): "out of range",
|
||||||
|
sep("超tian出yuan边tu界po", "foo", "17"): "out of range",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestScrub(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
strs := split(str)
|
||||||
|
return Scrub(strs[0], strs[1])
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("ab\uFFFDcd\xFF\xCEefg\xFF\xFC\xFD\xFAhijk", "*"): "ab*cd*efg*hijk",
|
||||||
|
sep("no错误です", "*"): "no错误です",
|
||||||
|
sep("", "*"): "",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestWordSplit(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
return sep(WordSplit(str)...)
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
"one word": sep("one", "word"),
|
||||||
|
"一个字:把他给我拿下!": "",
|
||||||
|
"it's a super-fancy one!!!a": sep("it's", "a", "super-fancy", "one", "a"),
|
||||||
|
"a -b-c' 'd'e": sep("a", "b-c'", "d'e"),
|
||||||
|
})
|
||||||
|
}
|
545
vendor/github.com/huandu/xstrings/translate.go
generated
vendored
Normal file
545
vendor/github.com/huandu/xstrings/translate.go
generated
vendored
Normal file
@ -0,0 +1,545 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package xstrings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"unicode"
|
||||||
|
"unicode/utf8"
|
||||||
|
)
|
||||||
|
|
||||||
|
type runeRangeMap struct {
|
||||||
|
FromLo rune // Lower bound of range map.
|
||||||
|
FromHi rune // An inclusive higher bound of range map.
|
||||||
|
ToLo rune
|
||||||
|
ToHi rune
|
||||||
|
}
|
||||||
|
|
||||||
|
type runeDict struct {
|
||||||
|
Dict [unicode.MaxASCII + 1]rune
|
||||||
|
}
|
||||||
|
|
||||||
|
type runeMap map[rune]rune
|
||||||
|
|
||||||
|
// Translator can translate string with pre-compiled from and to patterns.
|
||||||
|
// If a from/to pattern pair needs to be used more than once, it's recommended
|
||||||
|
// to create a Translator and reuse it.
|
||||||
|
type Translator struct {
|
||||||
|
quickDict *runeDict // A quick dictionary to look up rune by index. Only availabe for latin runes.
|
||||||
|
runeMap runeMap // Rune map for translation.
|
||||||
|
ranges []*runeRangeMap // Ranges of runes.
|
||||||
|
mappedRune rune // If mappedRune >= 0, all matched runes are translated to the mappedRune.
|
||||||
|
reverted bool // If to pattern is empty, all matched characters will be deleted.
|
||||||
|
hasPattern bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewTranslator creates new Translator through a from/to pattern pair.
|
||||||
|
func NewTranslator(from, to string) *Translator {
|
||||||
|
tr := &Translator{}
|
||||||
|
|
||||||
|
if from == "" {
|
||||||
|
return tr
|
||||||
|
}
|
||||||
|
|
||||||
|
reverted := from[0] == '^'
|
||||||
|
deletion := len(to) == 0
|
||||||
|
|
||||||
|
if reverted {
|
||||||
|
from = from[1:]
|
||||||
|
}
|
||||||
|
|
||||||
|
var fromStart, fromEnd, fromRangeStep rune
|
||||||
|
var toStart, toEnd, toRangeStep rune
|
||||||
|
var fromRangeSize, toRangeSize rune
|
||||||
|
var singleRunes []rune
|
||||||
|
|
||||||
|
// Update the to rune range.
|
||||||
|
updateRange := func() {
|
||||||
|
// No more rune to read in the to rune pattern.
|
||||||
|
if toEnd == utf8.RuneError {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if toRangeStep == 0 {
|
||||||
|
to, toStart, toEnd, toRangeStep = nextRuneRange(to, toEnd)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Current range is not empty. Consume 1 rune from start.
|
||||||
|
if toStart != toEnd {
|
||||||
|
toStart += toRangeStep
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// No more rune. Repeat the last rune.
|
||||||
|
if to == "" {
|
||||||
|
toEnd = utf8.RuneError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Both start and end are used. Read two more runes from the to pattern.
|
||||||
|
to, toStart, toEnd, toRangeStep = nextRuneRange(to, utf8.RuneError)
|
||||||
|
}
|
||||||
|
|
||||||
|
if deletion {
|
||||||
|
toStart = utf8.RuneError
|
||||||
|
toEnd = utf8.RuneError
|
||||||
|
} else {
|
||||||
|
// If from pattern is reverted, only the last rune in the to pattern will be used.
|
||||||
|
if reverted {
|
||||||
|
var size int
|
||||||
|
|
||||||
|
for len(to) > 0 {
|
||||||
|
toStart, size = utf8.DecodeRuneInString(to)
|
||||||
|
to = to[size:]
|
||||||
|
}
|
||||||
|
|
||||||
|
toEnd = utf8.RuneError
|
||||||
|
} else {
|
||||||
|
to, toStart, toEnd, toRangeStep = nextRuneRange(to, utf8.RuneError)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fromEnd = utf8.RuneError
|
||||||
|
|
||||||
|
for len(from) > 0 {
|
||||||
|
from, fromStart, fromEnd, fromRangeStep = nextRuneRange(from, fromEnd)
|
||||||
|
|
||||||
|
// fromStart is a single character. Just map it with a rune in the to pattern.
|
||||||
|
if fromRangeStep == 0 {
|
||||||
|
singleRunes = tr.addRune(fromStart, toStart, singleRunes)
|
||||||
|
updateRange()
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
for toEnd != utf8.RuneError && fromStart != fromEnd {
|
||||||
|
// If mapped rune is a single character instead of a range, simply shift first
|
||||||
|
// rune in the range.
|
||||||
|
if toRangeStep == 0 {
|
||||||
|
singleRunes = tr.addRune(fromStart, toStart, singleRunes)
|
||||||
|
updateRange()
|
||||||
|
fromStart += fromRangeStep
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
fromRangeSize = (fromEnd - fromStart) * fromRangeStep
|
||||||
|
toRangeSize = (toEnd - toStart) * toRangeStep
|
||||||
|
|
||||||
|
// Not enough runes in the to pattern. Need to read more.
|
||||||
|
if fromRangeSize > toRangeSize {
|
||||||
|
fromStart, toStart = tr.addRuneRange(fromStart, fromStart+toRangeSize*fromRangeStep, toStart, toEnd, singleRunes)
|
||||||
|
fromStart += fromRangeStep
|
||||||
|
updateRange()
|
||||||
|
|
||||||
|
// Edge case: If fromRangeSize == toRangeSize + 1, the last fromStart value needs be considered
|
||||||
|
// as a single rune.
|
||||||
|
if fromStart == fromEnd {
|
||||||
|
singleRunes = tr.addRune(fromStart, toStart, singleRunes)
|
||||||
|
updateRange()
|
||||||
|
}
|
||||||
|
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
fromStart, toStart = tr.addRuneRange(fromStart, fromEnd, toStart, toStart+fromRangeSize*toRangeStep, singleRunes)
|
||||||
|
updateRange()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
if fromStart == fromEnd {
|
||||||
|
fromEnd = utf8.RuneError
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
fromStart, toStart = tr.addRuneRange(fromStart, fromEnd, toStart, toStart, singleRunes)
|
||||||
|
fromEnd = utf8.RuneError
|
||||||
|
}
|
||||||
|
|
||||||
|
if fromEnd != utf8.RuneError {
|
||||||
|
singleRunes = tr.addRune(fromEnd, toStart, singleRunes)
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.reverted = reverted
|
||||||
|
tr.mappedRune = -1
|
||||||
|
tr.hasPattern = true
|
||||||
|
|
||||||
|
// Translate RuneError only if in deletion or reverted mode.
|
||||||
|
if deletion || reverted {
|
||||||
|
tr.mappedRune = toStart
|
||||||
|
}
|
||||||
|
|
||||||
|
return tr
|
||||||
|
}
|
||||||
|
|
||||||
|
func (tr *Translator) addRune(from, to rune, singleRunes []rune) []rune {
|
||||||
|
if from <= unicode.MaxASCII {
|
||||||
|
if tr.quickDict == nil {
|
||||||
|
tr.quickDict = &runeDict{}
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.quickDict.Dict[from] = to
|
||||||
|
} else {
|
||||||
|
if tr.runeMap == nil {
|
||||||
|
tr.runeMap = make(runeMap)
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.runeMap[from] = to
|
||||||
|
}
|
||||||
|
|
||||||
|
singleRunes = append(singleRunes, from)
|
||||||
|
return singleRunes
|
||||||
|
}
|
||||||
|
|
||||||
|
func (tr *Translator) addRuneRange(fromLo, fromHi, toLo, toHi rune, singleRunes []rune) (rune, rune) {
|
||||||
|
var r rune
|
||||||
|
var rrm *runeRangeMap
|
||||||
|
|
||||||
|
if fromLo < fromHi {
|
||||||
|
rrm = &runeRangeMap{
|
||||||
|
FromLo: fromLo,
|
||||||
|
FromHi: fromHi,
|
||||||
|
ToLo: toLo,
|
||||||
|
ToHi: toHi,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
rrm = &runeRangeMap{
|
||||||
|
FromLo: fromHi,
|
||||||
|
FromHi: fromLo,
|
||||||
|
ToLo: toHi,
|
||||||
|
ToHi: toLo,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If there is any single rune conflicts with this rune range, clear single rune record.
|
||||||
|
for _, r = range singleRunes {
|
||||||
|
if rrm.FromLo <= r && r <= rrm.FromHi {
|
||||||
|
if r <= unicode.MaxASCII {
|
||||||
|
tr.quickDict.Dict[r] = 0
|
||||||
|
} else {
|
||||||
|
delete(tr.runeMap, r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.ranges = append(tr.ranges, rrm)
|
||||||
|
return fromHi, toHi
|
||||||
|
}
|
||||||
|
|
||||||
|
func nextRuneRange(str string, last rune) (remaining string, start, end rune, rangeStep rune) {
|
||||||
|
var r rune
|
||||||
|
var size int
|
||||||
|
|
||||||
|
remaining = str
|
||||||
|
escaping := false
|
||||||
|
isRange := false
|
||||||
|
|
||||||
|
for len(remaining) > 0 {
|
||||||
|
r, size = utf8.DecodeRuneInString(remaining)
|
||||||
|
remaining = remaining[size:]
|
||||||
|
|
||||||
|
// Parse special characters.
|
||||||
|
if !escaping {
|
||||||
|
if r == '\\' {
|
||||||
|
escaping = true
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
if r == '-' {
|
||||||
|
// Ignore slash at beginning of string.
|
||||||
|
if last == utf8.RuneError {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
start = last
|
||||||
|
isRange = true
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
escaping = false
|
||||||
|
|
||||||
|
if last != utf8.RuneError {
|
||||||
|
// This is a range which start and end are the same.
|
||||||
|
// Considier it as a normal character.
|
||||||
|
if isRange && last == r {
|
||||||
|
isRange = false
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
start = last
|
||||||
|
end = r
|
||||||
|
|
||||||
|
if isRange {
|
||||||
|
if start < end {
|
||||||
|
rangeStep = 1
|
||||||
|
} else {
|
||||||
|
rangeStep = -1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
last = r
|
||||||
|
}
|
||||||
|
|
||||||
|
start = last
|
||||||
|
end = utf8.RuneError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Translate str with a from/to pattern pair.
|
||||||
|
//
|
||||||
|
// See comment in Translate function for usage and samples.
|
||||||
|
func (tr *Translator) Translate(str string) string {
|
||||||
|
if !tr.hasPattern || str == "" {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
|
||||||
|
var r rune
|
||||||
|
var size int
|
||||||
|
var needTr bool
|
||||||
|
|
||||||
|
orig := str
|
||||||
|
|
||||||
|
var output *bytes.Buffer
|
||||||
|
|
||||||
|
for len(str) > 0 {
|
||||||
|
r, size = utf8.DecodeRuneInString(str)
|
||||||
|
r, needTr = tr.TranslateRune(r)
|
||||||
|
|
||||||
|
if needTr && output == nil {
|
||||||
|
output = allocBuffer(orig, str)
|
||||||
|
}
|
||||||
|
|
||||||
|
if r != utf8.RuneError && output != nil {
|
||||||
|
output.WriteRune(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
str = str[size:]
|
||||||
|
}
|
||||||
|
|
||||||
|
// No character is translated.
|
||||||
|
if output == nil {
|
||||||
|
return orig
|
||||||
|
}
|
||||||
|
|
||||||
|
return output.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
// TranslateRune return translated rune and true if r matches the from pattern.
|
||||||
|
// If r doesn't match the pattern, original r is returned and translated is false.
|
||||||
|
func (tr *Translator) TranslateRune(r rune) (result rune, translated bool) {
|
||||||
|
switch {
|
||||||
|
case tr.quickDict != nil:
|
||||||
|
if r <= unicode.MaxASCII {
|
||||||
|
result = tr.quickDict.Dict[r]
|
||||||
|
|
||||||
|
if result != 0 {
|
||||||
|
translated = true
|
||||||
|
|
||||||
|
if tr.mappedRune >= 0 {
|
||||||
|
result = tr.mappedRune
|
||||||
|
}
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fallthrough
|
||||||
|
|
||||||
|
case tr.runeMap != nil:
|
||||||
|
var ok bool
|
||||||
|
|
||||||
|
if result, ok = tr.runeMap[r]; ok {
|
||||||
|
translated = true
|
||||||
|
|
||||||
|
if tr.mappedRune >= 0 {
|
||||||
|
result = tr.mappedRune
|
||||||
|
}
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
fallthrough
|
||||||
|
|
||||||
|
default:
|
||||||
|
var rrm *runeRangeMap
|
||||||
|
ranges := tr.ranges
|
||||||
|
|
||||||
|
for i := len(ranges) - 1; i >= 0; i-- {
|
||||||
|
rrm = ranges[i]
|
||||||
|
|
||||||
|
if rrm.FromLo <= r && r <= rrm.FromHi {
|
||||||
|
translated = true
|
||||||
|
|
||||||
|
if tr.mappedRune >= 0 {
|
||||||
|
result = tr.mappedRune
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
if rrm.ToLo < rrm.ToHi {
|
||||||
|
result = rrm.ToLo + r - rrm.FromLo
|
||||||
|
} else if rrm.ToLo > rrm.ToHi {
|
||||||
|
// ToHi can be smaller than ToLo if range is from higher to lower.
|
||||||
|
result = rrm.ToLo - r + rrm.FromLo
|
||||||
|
} else {
|
||||||
|
result = rrm.ToLo
|
||||||
|
}
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if tr.reverted {
|
||||||
|
if !translated {
|
||||||
|
result = tr.mappedRune
|
||||||
|
}
|
||||||
|
|
||||||
|
translated = !translated
|
||||||
|
}
|
||||||
|
|
||||||
|
if !translated {
|
||||||
|
result = r
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasPattern returns true if Translator has one pattern at least.
|
||||||
|
func (tr *Translator) HasPattern() bool {
|
||||||
|
return tr.hasPattern
|
||||||
|
}
|
||||||
|
|
||||||
|
// Translate str with the characters defined in from replaced by characters defined in to.
|
||||||
|
//
|
||||||
|
// From and to are patterns representing a set of characters. Pattern is defined as following.
|
||||||
|
//
|
||||||
|
// * Special characters
|
||||||
|
// * '-' means a range of runes, e.g.
|
||||||
|
// * "a-z" means all characters from 'a' to 'z' inclusive;
|
||||||
|
// * "z-a" means all characters from 'z' to 'a' inclusive.
|
||||||
|
// * '^' as first character means a set of all runes excepted listed, e.g.
|
||||||
|
// * "^a-z" means all characters except 'a' to 'z' inclusive.
|
||||||
|
// * '\' escapes special characters.
|
||||||
|
// * Normal character represents itself, e.g. "abc" is a set including 'a', 'b' and 'c'.
|
||||||
|
//
|
||||||
|
// Translate will try to find a 1:1 mapping from from to to.
|
||||||
|
// If to is smaller than from, last rune in to will be used to map "out of range" characters in from.
|
||||||
|
//
|
||||||
|
// Note that '^' only works in the from pattern. It will be considered as a normal character in the to pattern.
|
||||||
|
//
|
||||||
|
// If the to pattern is an empty string, Translate works exactly the same as Delete.
|
||||||
|
//
|
||||||
|
// Samples:
|
||||||
|
// Translate("hello", "aeiou", "12345") => "h2ll4"
|
||||||
|
// Translate("hello", "a-z", "A-Z") => "HELLO"
|
||||||
|
// Translate("hello", "z-a", "a-z") => "svool"
|
||||||
|
// Translate("hello", "aeiou", "*") => "h*ll*"
|
||||||
|
// Translate("hello", "^l", "*") => "**ll*"
|
||||||
|
// Translate("hello ^ world", `\^lo`, "*") => "he*** * w*r*d"
|
||||||
|
func Translate(str, from, to string) string {
|
||||||
|
tr := NewTranslator(from, to)
|
||||||
|
return tr.Translate(str)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Delete runes in str matching the pattern.
|
||||||
|
// Pattern is defined in Translate function.
|
||||||
|
//
|
||||||
|
// Samples:
|
||||||
|
// Delete("hello", "aeiou") => "hll"
|
||||||
|
// Delete("hello", "a-k") => "llo"
|
||||||
|
// Delete("hello", "^a-k") => "he"
|
||||||
|
func Delete(str, pattern string) string {
|
||||||
|
tr := NewTranslator(pattern, "")
|
||||||
|
return tr.Translate(str)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Count how many runes in str match the pattern.
|
||||||
|
// Pattern is defined in Translate function.
|
||||||
|
//
|
||||||
|
// Samples:
|
||||||
|
// Count("hello", "aeiou") => 3
|
||||||
|
// Count("hello", "a-k") => 3
|
||||||
|
// Count("hello", "^a-k") => 2
|
||||||
|
func Count(str, pattern string) int {
|
||||||
|
if pattern == "" || str == "" {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
var r rune
|
||||||
|
var size int
|
||||||
|
var matched bool
|
||||||
|
|
||||||
|
tr := NewTranslator(pattern, "")
|
||||||
|
cnt := 0
|
||||||
|
|
||||||
|
for len(str) > 0 {
|
||||||
|
r, size = utf8.DecodeRuneInString(str)
|
||||||
|
str = str[size:]
|
||||||
|
|
||||||
|
if _, matched = tr.TranslateRune(r); matched {
|
||||||
|
cnt++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return cnt
|
||||||
|
}
|
||||||
|
|
||||||
|
// Squeeze deletes adjacent repeated runes in str.
|
||||||
|
// If pattern is not empty, only runes matching the pattern will be squeezed.
|
||||||
|
//
|
||||||
|
// Samples:
|
||||||
|
// Squeeze("hello", "") => "helo"
|
||||||
|
// Squeeze("hello", "m-z") => "hello"
|
||||||
|
func Squeeze(str, pattern string) string {
|
||||||
|
var last, r rune
|
||||||
|
var size int
|
||||||
|
var skipSqueeze, matched bool
|
||||||
|
var tr *Translator
|
||||||
|
var output *bytes.Buffer
|
||||||
|
|
||||||
|
orig := str
|
||||||
|
last = -1
|
||||||
|
|
||||||
|
if len(pattern) > 0 {
|
||||||
|
tr = NewTranslator(pattern, "")
|
||||||
|
}
|
||||||
|
|
||||||
|
for len(str) > 0 {
|
||||||
|
r, size = utf8.DecodeRuneInString(str)
|
||||||
|
|
||||||
|
// Need to squeeze the str.
|
||||||
|
if last == r && !skipSqueeze {
|
||||||
|
if tr != nil {
|
||||||
|
if _, matched = tr.TranslateRune(r); !matched {
|
||||||
|
skipSqueeze = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if output == nil {
|
||||||
|
output = allocBuffer(orig, str)
|
||||||
|
}
|
||||||
|
|
||||||
|
if skipSqueeze {
|
||||||
|
output.WriteRune(r)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if output != nil {
|
||||||
|
output.WriteRune(r)
|
||||||
|
}
|
||||||
|
|
||||||
|
last = r
|
||||||
|
}
|
||||||
|
|
||||||
|
str = str[size:]
|
||||||
|
}
|
||||||
|
|
||||||
|
if output == nil {
|
||||||
|
return orig
|
||||||
|
}
|
||||||
|
|
||||||
|
return output.String()
|
||||||
|
}
|
92
vendor/github.com/huandu/xstrings/translate_test.go
generated
vendored
Normal file
92
vendor/github.com/huandu/xstrings/translate_test.go
generated
vendored
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package xstrings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestTranslate(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
input := strings.Split(str, separator)
|
||||||
|
return Translate(input[0], input[1], input[2])
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("hello", "aeiou", "12345"): "h2ll4",
|
||||||
|
sep("hello", "aeiou", ""): "hll",
|
||||||
|
sep("hello", "a-z", "A-Z"): "HELLO",
|
||||||
|
sep("hello", "z-a", "a-z"): "svool",
|
||||||
|
sep("hello", "aeiou", "*"): "h*ll*",
|
||||||
|
sep("hello", "^l", "*"): "**ll*",
|
||||||
|
sep("hello", "p-z", "*"): "hello",
|
||||||
|
sep("hello ^ world", `\^lo`, "*"): "he*** * w*r*d",
|
||||||
|
|
||||||
|
sep("中文字符测试", "文中谁敢试?", "123456"): "21字符测5",
|
||||||
|
sep("中文字符测试", "^文中谁敢试?", "123456"): "中文666试",
|
||||||
|
sep("中文字符测试", "字-试", "0-9"): "中90999",
|
||||||
|
|
||||||
|
sep("h1e2l3l4o, w5o6r7l8d", "a-z,0-9", `A-Z\-a-czk-p`): "HbEcLzLkO- WlOmRnLoD",
|
||||||
|
sep("h1e2l3l4o, w5o6r7l8d", "a-zoh-n", "b-zakt-z"): "t1f2x3x4k, x5k6s7x8e",
|
||||||
|
sep("h1e2l3l4o, w5o6r7l8d", "helloa-zoh-n", "99999b-zakt-z"): "t1f2x3x4k, x5k6s7x8e",
|
||||||
|
|
||||||
|
sep("hello", "e-", "p"): "hpllo",
|
||||||
|
sep("hello", "-e-", "p"): "hpllo",
|
||||||
|
sep("hello", "----e---", "p"): "hpllo",
|
||||||
|
sep("hello", "^---e----", "p"): "peppp",
|
||||||
|
|
||||||
|
sep("hel\uFFFDlo", "\uFFFD", "H"): "helHlo",
|
||||||
|
sep("hel\uFFFDlo", "^\uFFFD", "H"): "HHHHH",
|
||||||
|
sep("hel\uFFFDlo", "o-\uFFFDh", "H"): "HelHlH",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestDelete(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
input := strings.Split(str, separator)
|
||||||
|
return Delete(input[0], input[1])
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("hello", "aeiou"): "hll",
|
||||||
|
sep("hello", "a-k"): "llo",
|
||||||
|
sep("hello", "^a-k"): "he",
|
||||||
|
|
||||||
|
sep("中文字符测试", "文中谁敢试?"): "字符测",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestCount(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
input := strings.Split(str, separator)
|
||||||
|
return fmt.Sprint(Count(input[0], input[1]))
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("hello", "aeiou"): "2",
|
||||||
|
sep("hello", "a-k"): "2",
|
||||||
|
sep("hello", "^a-k"): "3",
|
||||||
|
|
||||||
|
sep("中文字符测试", "文中谁敢试?"): "3",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestSqueeze(t *testing.T) {
|
||||||
|
runner := func(str string) string {
|
||||||
|
input := strings.Split(str, separator)
|
||||||
|
return Squeeze(input[0], input[1])
|
||||||
|
}
|
||||||
|
|
||||||
|
runTestCases(t, runner, _M{
|
||||||
|
sep("hello", ""): "helo",
|
||||||
|
sep("hello", "a-k"): "hello",
|
||||||
|
sep("hello", "^a-k"): "helo",
|
||||||
|
sep("hello", "^a-l"): "hello",
|
||||||
|
|
||||||
|
sep("打打打打个劫!!", ""): "打个劫!",
|
||||||
|
sep("打打打打个劫!!", "打"): "打个劫!!",
|
||||||
|
})
|
||||||
|
}
|
33
vendor/github.com/huandu/xstrings/util_test.go
generated
vendored
Normal file
33
vendor/github.com/huandu/xstrings/util_test.go
generated
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
// Copyright 2015 Huan Du. All rights reserved.
|
||||||
|
// Licensed under the MIT license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package xstrings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"strings"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
type _M map[string]string
|
||||||
|
|
||||||
|
const (
|
||||||
|
separator = " ¶ "
|
||||||
|
)
|
||||||
|
|
||||||
|
func runTestCases(t *testing.T, converter func(string) string, cases map[string]string) {
|
||||||
|
for k, v := range cases {
|
||||||
|
s := converter(k)
|
||||||
|
|
||||||
|
if s != v {
|
||||||
|
t.Fatalf("case fails. [case:%v]\nshould => %#v\nactual => %#v", k, v, s)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func sep(strs ...string) string {
|
||||||
|
return strings.Join(strs, separator)
|
||||||
|
}
|
||||||
|
|
||||||
|
func split(str string) []string {
|
||||||
|
return strings.Split(str, separator)
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user