Documentation
¶
Index ¶
- func ChannelToSlice[t any](channel <-chan t) []t
- func GetIssueKey(ruleId string, path string, startLine int, endLine int, startCol int, ...) string
- func GetUserAgent(c configuration.Configuration, version string) networking.UserAgentInfo
- func Hash(content []byte) string
- func Ignored(gitIgnore *ignore.GitIgnore, path string) bool
- func IsChannelClosed[T any](ch <-chan T) bool
- func Max[T ordered](values ...T) T
- func Min[T ordered](values ...T) T
- func Result[t any](value t, _ error) t
- func Sha256First16Hash(input string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChannelToSlice ¶
func ChannelToSlice[t any](channel <-chan t) []t
channelToSlice converts a channel to a slice by reading all values from the channel.
func GetIssueKey ¶
func GetUserAgent ¶
func GetUserAgent(c configuration.Configuration, version string) networking.UserAgentInfo
func IsChannelClosed ¶
func Result ¶
Result returns the result of a function call and ignores the error. This saves lines when you don't care about the error and want to inline the call.
For example, instead of writing: val, _ := someFunc() foo(val)
You can write: foo(Result(someFunc()))
func Sha256First16Hash ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.