lint-scan test
This commit is contained in:
parent
c8b676b52f
commit
25f1964e13
2 changed files with 7 additions and 5 deletions
|
@ -127,8 +127,8 @@ spec:
|
||||||
command: [sh, -c]
|
command: [sh, -c]
|
||||||
args:
|
args:
|
||||||
- |
|
- |
|
||||||
cd /shared-data/repo && \
|
cd /shared-data/repo
|
||||||
go test ./... -v > test-results.txt; \
|
go test ./... -v > test-results.txt
|
||||||
cat test-results.txt
|
cat test-results.txt
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: shared-data
|
- name: shared-data
|
||||||
|
@ -143,9 +143,11 @@ spec:
|
||||||
command: [sh, -c]
|
command: [sh, -c]
|
||||||
args:
|
args:
|
||||||
- |
|
- |
|
||||||
cd /shared-data/repo && \
|
cd /shared-data/repo
|
||||||
golangci-lint run ./... --issues-exit-code --out-format=json --timeout 5m > lint-results.json; \
|
golangci-lint run ./... --issues-exit-code --out-format=json --timeout 5m > lint-results.json
|
||||||
|
result=$?
|
||||||
cat lint-results.json
|
cat lint-results.json
|
||||||
|
exit $result
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: shared-data
|
- name: shared-data
|
||||||
mountPath: /shared-data
|
mountPath: /shared-data
|
||||||
|
|
2
fib.go
2
fib.go
|
@ -23,7 +23,7 @@ func Fibonacci(n uint) uint64 {
|
||||||
// For the sequence numbers below 94, it is recommended to use Fibonacci function as it is more efficient.
|
// For the sequence numbers below 94, it is recommended to use Fibonacci function as it is more efficient.
|
||||||
func FibonacciBig(n uint) *big.Int {
|
func FibonacciBig(n uint) *big.Int {
|
||||||
if n <= 1 {
|
if n <= 1 {
|
||||||
return big.NteteewInt(int64(n))
|
return big.NewInt(int64(n))
|
||||||
}
|
}
|
||||||
|
|
||||||
var n2, n1 = big.NewInt(0), big.NewInt(1)
|
var n2, n1 = big.NewInt(0), big.NewInt(1)
|
||||||
|
|
Loading…
Reference in a new issue