pererohit / gosvc Goto Github PK
View Code? Open in Web Editor NEWCli to generate skeleton HTTP server in Go with basic Health endpoints.
Cli to generate skeleton HTTP server in Go with basic Health endpoints.
New --dest
optional flag that will allow file generation to the path given to this parameter.
Currently, files are generated into the service directory from where the gosvc
command is executed.
Add test files & test cases for the generated files demonstrating the usage of gomock.
add comments to the generated files
Defer creating the test files after mocks are generated as doing go mod tidy
before causes go to find the repository for modules with URL type.
> gosvc --init github.com/PereRohit/Convert
errors obtained: error: go: finding module for package github.com/PereRohit/Convert/pkg/mock
github.com/PereRohit/Convert/internal/handler tested by
github.com/PereRohit/Convert/internal/handler.test imports
github.com/PereRohit/Convert/pkg/mock: cannot find module providing package github.com/PereRohit/Convert/pkg/mock: module github.com/PereRohit/Convert/pkg/mock: git ls-remote -q origin in .../go/pkg/mod/cache/vcs/0d4b536d7a46e79420c8d7f141beeb39c2191bd02e025976be23c3b30e8477bc: exit status 128:
remote: Repository not found.
fatal: repository 'https://github.com/PereRohit/Convert/' not found
If mockgen
is not installed on the users system, the process fails and the generated files are deleted. Maybe the user wants to use a different mocking framework or write their own mock code.
Let the generated files be as is and display a message for mocks not generated due to missing mockgen
.
Can additionally add a flag --install-deps
that can install dependencies like mockgen
if not found.
Installation followed by init
usage gives error
PS C:\Users\Perennial\go\src> gosvc -init "testserver"
read file error: open resources\README.md.tmpl: file does not exist
error: chdir C:\Users\Perennial\go\src\testserver: The system cannot find the file specified.
Integrate open api swagger comments for auto api spec generation for the generated endpoints. This can also act as a template for gosvc
end-users.
reference: https://shashankvivek-7.medium.com/go-swagger-a-go-web-framework-worth-learning-af0e9ed75343
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.