From 43bb79cfc808265279fea8fb83300a1276c17317 Mon Sep 17 00:00:00 2001 From: Ernest Micklei Date: Sat, 28 Jan 2017 06:25:28 +0100 Subject: [PATCH] pkg rename --- LICENSE | 22 ++++++++++++++++++++++ README.md | 6 ++---- enum.go | 2 +- enum_test.go | 2 +- field.go | 2 +- field_test.go | 2 +- import.go | 2 +- import_test.go | 2 +- message.go | 2 +- message_test.go | 2 +- option.go | 2 +- option_test.go | 2 +- package.go | 2 +- parser.go | 2 +- parser_test.go | 2 +- proto.go | 2 +- proto_test.go | 2 +- scanner.go | 2 +- scanner_test.go | 2 +- service.go | 2 +- service_test.go | 2 +- syntax.go | 2 +- syntax_test.go | 2 +- token.go | 2 +- visitor.go | 2 +- 25 files changed, 47 insertions(+), 27 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..aeab5b4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2017 Ernest Micklei + +MIT License + +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. \ No newline at end of file diff --git a/README.md b/README.md index a2f2137..f6656af 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ -# proto3parser +# proto3 Package for parsing Google Protocol Buffers [.proto files version 3] (https://developers.google.com/protocol-buffers/docs/reference/proto3-spec) -The command folder contains a pretty printer. - -(c) 2017, ernestmicklei.com. \ No newline at end of file +(c) 2017, ernestmicklei.com. MIT License. Contributions welcome. \ No newline at end of file diff --git a/enum.go b/enum.go index bc5cf69..b9218af 100644 --- a/enum.go +++ b/enum.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "fmt" diff --git a/enum_test.go b/enum_test.go index c5258d5..d556c1f 100644 --- a/enum_test.go +++ b/enum_test.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "strings" diff --git a/field.go b/field.go index 723194c..fb3f000 100644 --- a/field.go +++ b/field.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "fmt" diff --git a/field_test.go b/field_test.go index 24f4469..80a4869 100644 --- a/field_test.go +++ b/field_test.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "strings" diff --git a/import.go b/import.go index 9687326..6210b4d 100644 --- a/import.go +++ b/import.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "fmt" diff --git a/import_test.go b/import_test.go index f4cf689..f48a8e0 100644 --- a/import_test.go +++ b/import_test.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "strings" diff --git a/message.go b/message.go index fb4a943..37f9cd6 100644 --- a/message.go +++ b/message.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "bytes" diff --git a/message_test.go b/message_test.go index 63a38b2..21586b3 100644 --- a/message_test.go +++ b/message_test.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "strings" diff --git a/option.go b/option.go index 9ccdfe3..677a993 100644 --- a/option.go +++ b/option.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import "fmt" diff --git a/option_test.go b/option_test.go index 2fbb1ae..dabf695 100644 --- a/option_test.go +++ b/option_test.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "strings" diff --git a/package.go b/package.go index 41f203f..0657b73 100644 --- a/package.go +++ b/package.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 type Package struct { Name string diff --git a/parser.go b/parser.go index 211005b..89d5daf 100644 --- a/parser.go +++ b/parser.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import "io" diff --git a/parser_test.go b/parser_test.go index 5e991ca..25e0775 100644 --- a/parser_test.go +++ b/parser_test.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "strconv" diff --git a/proto.go b/proto.go index d32e850..0ec3ef8 100644 --- a/proto.go +++ b/proto.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 type Proto struct { Syntax *Syntax diff --git a/proto_test.go b/proto_test.go index 8709f07..7b182f1 100644 --- a/proto_test.go +++ b/proto_test.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import "testing" diff --git a/scanner.go b/scanner.go index a75e47e..c47c766 100644 --- a/scanner.go +++ b/scanner.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 // partial code from https://raw.githubusercontent.com/benbjohnson/sql-parser/master/scanner.go diff --git a/scanner_test.go b/scanner_test.go index 0b97ada..d41a885 100644 --- a/scanner_test.go +++ b/scanner_test.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "strings" diff --git a/service.go b/service.go index 1e40748..c7ff59d 100644 --- a/service.go +++ b/service.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "bytes" diff --git a/service_test.go b/service_test.go index 45fa732..f5b9d53 100644 --- a/service_test.go +++ b/service_test.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "strings" diff --git a/syntax.go b/syntax.go index 5c36a27..0a21be7 100644 --- a/syntax.go +++ b/syntax.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import "fmt" diff --git a/syntax_test.go b/syntax_test.go index 699dfda..8a4e868 100644 --- a/syntax_test.go +++ b/syntax_test.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 import ( "strings" diff --git a/token.go b/token.go index 4e15587..45a30b6 100644 --- a/token.go +++ b/token.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 // token represents a lexical token. type token int diff --git a/visitor.go b/visitor.go index c1e536c..02dccc9 100644 --- a/visitor.go +++ b/visitor.go @@ -1,4 +1,4 @@ -package proto3parser +package proto3 type Visitor interface { VisitMessage(m *Message)