mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2026-01-16 04:14:30 +07:00
chore: move samples into fixtures (#1321)
This commit is contained in:
committed by
GitHub
parent
aa6fad0ea0
commit
5a9289952f
3
fixtures/monorepo/a/go.mod
Normal file
3
fixtures/monorepo/a/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module github.com/golangci/actiona
|
||||
|
||||
go 1.24.0
|
||||
26
fixtures/monorepo/a/sample.go
Normal file
26
fixtures/monorepo/a/sample.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// Package sample is used as test input for golangci action.
|
||||
package sample
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
)
|
||||
|
||||
// Hash~
|
||||
func Hash(data string) string {
|
||||
retError()
|
||||
retError2()
|
||||
|
||||
h := md5.New()
|
||||
h.Write([]byte(data))
|
||||
return hex.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
|
||||
func retError() error {
|
||||
return errors.New("err")
|
||||
}
|
||||
|
||||
func retError2() error {
|
||||
return errors.New("err2")
|
||||
}
|
||||
3
fixtures/monorepo/a/suba/go.mod
Normal file
3
fixtures/monorepo/a/suba/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module github.com/golangci/actiona/suba
|
||||
|
||||
go 1.24.0
|
||||
26
fixtures/monorepo/a/suba/sample.go
Normal file
26
fixtures/monorepo/a/suba/sample.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// Package sample is used as test input for golangci action.
|
||||
package sample
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
)
|
||||
|
||||
// Hash~
|
||||
func Hash(data string) string {
|
||||
retError()
|
||||
retError2()
|
||||
|
||||
h := md5.New()
|
||||
h.Write([]byte(data))
|
||||
return hex.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
|
||||
func retError() error {
|
||||
return errors.New("err")
|
||||
}
|
||||
|
||||
func retError2() error {
|
||||
return errors.New("err2")
|
||||
}
|
||||
3
fixtures/monorepo/b/go.mod
Normal file
3
fixtures/monorepo/b/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module github.com/golangci/actionb
|
||||
|
||||
go 1.24.0
|
||||
26
fixtures/monorepo/b/sample.go
Normal file
26
fixtures/monorepo/b/sample.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// Package sample is used as test input for golangci action.
|
||||
package sample
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
)
|
||||
|
||||
// Hash~
|
||||
func Hash(data string) string {
|
||||
retError()
|
||||
retError2()
|
||||
|
||||
h := md5.New()
|
||||
h.Write([]byte(data))
|
||||
return hex.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
|
||||
func retError() error {
|
||||
return errors.New("err")
|
||||
}
|
||||
|
||||
func retError2() error {
|
||||
return errors.New("err2")
|
||||
}
|
||||
3
fixtures/monorepo/c/go.mod
Normal file
3
fixtures/monorepo/c/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module github.com/golangci/actionc
|
||||
|
||||
go 1.24.0
|
||||
26
fixtures/monorepo/c/sample.go
Normal file
26
fixtures/monorepo/c/sample.go
Normal file
@@ -0,0 +1,26 @@
|
||||
// Package sample is used as test input for golangci action.
|
||||
package sample
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
)
|
||||
|
||||
// Hash~
|
||||
func Hash(data string) string {
|
||||
retError()
|
||||
retError2()
|
||||
|
||||
h := md5.New()
|
||||
h.Write([]byte(data))
|
||||
return hex.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
|
||||
func retError() error {
|
||||
return errors.New("err")
|
||||
}
|
||||
|
||||
func retError2() error {
|
||||
return errors.New("err2")
|
||||
}
|
||||
Reference in New Issue
Block a user