Comments (13)
@peter-edge Hi. Sorry for this, but I just started doing:
sed -i 's/import google_protobuf "google\/protobuf"/import google_protobuf "github.com\/peter-edge\/go-google-protobuf"/' ${proto_dir}/checker.pb.go
Because works. Let me know if I can do anything to help maintain. I'm not sure of how it might be integrated into this project, exactly. But yeah... I have this problem, too.
from protobuf.
Why are you so awesome? Thanks. ❤️
from protobuf.
This would be awesome. It would make using protobuf with Go significantly easier
from protobuf.
build type.proto
failed:
protoc version:
protoc --version
libprotoc 3.0.0
error message:
protoc --go_out=. any.proto source_context.proto type.proto
google/protobuf/any.proto:94:10: "google.protobuf.Any.type_url" is already defined in file "any.proto".
google/protobuf/any.proto:97:9: "google.protobuf.Any.value" is already defined in file "any.proto".
google/protobuf/any.proto:73:9: "google.protobuf.Any" is already defined in file "any.proto".
google/protobuf/source_context.proto:46:10: "google.protobuf.SourceContext.file_name" is already defined in file "source_context.proto".
google/protobuf/source_context.proto:43:9: "google.protobuf.SourceContext" is already defined in file "source_context.proto".
type.proto: Import "google/protobuf/any.proto" was not found or had errors.
type.proto: Import "google/protobuf/source_context.proto" was not found or had errors.
type.proto:55:3: "google.protobuf.SourceContext" seems to be defined in "source_context.proto", which is not imported by "type.proto". To use it here, please add the necessary import.
type.proto:147:3: "google.protobuf.SourceContext" seems to be defined in "source_context.proto", which is not imported by "type.proto". To use it here, please add the necessary import.
type.proto:167:3: "google.protobuf.Any" seems to be defined in "any.proto", which is not imported by "type.proto". To use it here, please add the necessary import.
from protobuf.
😽
from protobuf.
It would be really nice to have those packages compiled
from protobuf.
8ea33d2 adds some initial types. I'll add more shortly.
from protobuf.
There's zero diff from the google/protobuf .proto files (except for adding a go_package
option to make protoc-gen-go
generate a good package name, which I hope to upstream).
I put them in separate Go packages since that seemed to make more sense to me, and couldn't think of compelling reasons for them to all be in the same package (their existing package declarations notwithstanding). But I'm happy to hear arguments for them all going together.
from protobuf.
Any arguments, @peter-edge?
from protobuf.
Okay, I'll leave it as I have it now. Neither approach is perfect, and we can consider changing it in the future, but the current state should be fine.
from protobuf.
About date/durations,
how about creating some func to get/set timestamps from golang time ?
Like func NewTimestamp(time.Time) *Timestamp
and func (t *Timestamp) Time() time.Time
& same for Durations ?
Directly in the timestamp pkg, I think it's fine if it's not generated.
from protobuf.
I think you are looking for...
https://godoc.org/github.com/golang/protobuf/ptypes#Timestamp
https://godoc.org/github.com/golang/protobuf/ptypes#TimestampProto
Btw, I don't think your comment is related to the original issue.
from protobuf.
Ah, thx @cybrcodr.
I put it here bcs #49 redirects here, not that much related, yes, sry ! Cheers !
from protobuf.
Related Issues (20)
- encoding/protojson: handling google.protobuf.Empty HOT 15
- Make M option overwrite `option go_package` in the `.proto` file (as opposed to return an error) HOT 5
- related to #1054 and similar "plugin output is unparseable" errors HOT 4
- Random 0xfeff / ZERO WIDTH NO-BREAK SPACE being added to returned string values HOT 3
- custom options doesn't seem to work for protobuf map fields HOT 2
- Can protobuf provide tags for customized message generated fields? HOT 2
- encoding/protojson: unmarshalBytes assumes no padding if byte string length is not divisible by 4 HOT 27
- Service crash caused by encoding HOT 3
- structpb.Struct.MarshalJSON is not consistent HOT 4
- --gofast_out option in protoc discards inline comments from .proto files HOT 1
- How to redefine the json tag? HOT 2
- proto.Equal does not check for nested invalidity HOT 5
- A terrible work-around: HOT 2
- protoreflect x dynamicpb interaction: should descriptors match names or be pointer-identical?
- add proto.IsWellFormed helper function to validate that a message value is well-formed HOT 1
- google.protobuf.Empty as response serializes to not empty response depending on request headers HOT 2
- protocmp: Panic on embed message field comparison HOT 7
- Panic when use enum.String() before main() HOT 2
- Proposal: remove presumably unused purego support
- Why does deserialize []byte("xxxx") into a proto structure work? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protobuf.