Coder Social home page Coder Social logo

pseudomuto / protokit Goto Github PK

View Code? Open in Web Editor NEW
75.0 4.0 28.0 129 KB

A starter kit for building protoc plugins. Rather than write your own, you can just use an existing one.

License: MIT License

Makefile 3.33% Go 96.67%
protobuf protobuf-parser protoc protoc-plugin

protokit's People

Contributors

htdvisser avatar pseudomuto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

protokit's Issues

Allow all files (not just targeted files) to be included

First off, this is a fantastic project. I was able to rewrite a squirrels nest of node code with this library in much fewer lines and the API here took care of a lot of the work I was doing before. Thank you!

One snag I hit was in implementing a compiler for a number of protos from different projects that I'm currently tying together by including each directory in my import path. I can't compile each separately because my target is format that doesn't support imports at all.

Because of the decision to only include those files in the output request, I have to glob all of the protos I have, which break a number of their import resolutions instead of just pointing the compiler at the one entry point proto that imports the rest.

Specifically this decision makes globbing multi project protos difficult. Is there any consideration to making that behavior configurable?

Comments scrub function a feature or a bug?

Thanks for the great repo @pseudomuto.

We have been using protokit as part of our process of auto-generating API reference documentation from proto files. We are experiencing some issues caused by the scrub function in comments.go

func scrub(str string) string {

The function obviously trims white spaces but this causes grammar issues in the resulting comments.

Rather than having a single line string, proto comments are often structured in the following way to improve readability in the actual proto:

// The definition of a book resource in the
// context of the university library.
message Book{}

Due to the scrub function, this will cause the sentence to include thecontext rather than having a space between the words.

This is our primary use case for using comments so just want to check whether scrub is actually used for cases I am not envisioning and whether I can submit a PR to remove it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.