corsc / go-tools Goto Github PK
View Code? Open in Web Editor NEWThings to make golang development better
License: Apache License 2.0
Things to make golang development better
License: Apache License 2.0
If you supplied the -i flag without a value the error message does not make any sense
2017/03/03 00:40:50 error file finding coverage files chdir 70: no such file or directory Error: error file finding coverage files chdir 70: no such file or directory
General idea here is to use this tool to "fail builds" when coverage drops below set minimums.
Something like:
package-coverage -c -min 70
// Outputs:
Fail: github.com/corsc/go-tools/ is 50.1% (minimum: 70.0%)
package-coverage -c -p ./
works as intended
package-coverage -c -p ./some-package/
does not. The coverage is generated but nothing is printed
package-coverage -p ./my-package/
however does work as intended
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x1195f70]
such as if your interface like this
type test interface { MyTest() }
the error code is
`
func extractParamsAndResults(fnDesl *ast.FuncType) ([]MethodField, []MethodField) {
params := extractFieldsFromAst(fnDesl.Params.List)
results := extractFieldsFromAst(fnDesl.Results.List)
return params, results
}
`
you should change it like this
`
func extractParamsAndResults(fnDesl *ast.FuncType) ([]MethodField, []MethodField) {
var params []MethodField
var results []MethodField
if fnDesl.Params.List != nil {
params = extractFieldsFromAst(fnDesl.Params.List)
}
if fnDesl.Results.List != nil {
results = extractFieldsFromAst(fnDesl.Results.List)
}
return params, results
}
`
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.