mx-psi / porto

Tool for adding vanity import to Go code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Porto

Tool for adding vanity imports URI to Go files.

e.g. package zipkin -> package zipkin // import "github.com/openzipkin/zipkin-go"

Install

go install github.com/jcchavezs/porto/cmd/porto

Getting started

Run the tool and display the changes without applying them

porto path/to/library

If you want the changes to be applied to the files directly, run:

porto -w path/to/library

If you just want to list the files that porto would change vanity import, run:

porto -l path/to/library

If you want to ignore files (e.g. proto generated files), pass the --skip-files flag:

porto --skip-files ".*\\.pb\\.go$" path/to/library

About

Tool for adding vanity import to Go code

License:Apache License 2.0


Languages

Language:Go 96.3%Language:Makefile 3.7%