Compare commits
2 Commits
e785ce2860
...
db88502414
Author | SHA1 | Date | |
---|---|---|---|
db88502414 | |||
787e0526dc |
|
@ -1,3 +1,5 @@
|
||||||
|
// Package conf provides a configuration file parser for JOJ3.
|
||||||
|
// The configuration file path is determined by the commit message.
|
||||||
package conf
|
package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
1
cmd/joj3/env/env.go
vendored
1
cmd/joj3/env/env.go
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
// Package env stores the environment variables from actions environment.
|
||||||
package env
|
package env
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
// Referenced from https://github.com/yuriisk/clang-tidy-converter/blob/master/clang_tidy_converter/parser/clang_tidy_parser.py
|
|
||||||
package clangtidy
|
package clangtidy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -6,6 +5,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Referenced from https://github.com/yuriisk/clang-tidy-converter/blob/master/clang_tidy_converter/parser/clang_tidy_parser.py
|
||||||
type JsonMessage struct {
|
type JsonMessage struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
CheckName string `json:"checkname"`
|
CheckName string `json:"checkname"`
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
package utils
|
|
||||||
|
|
||||||
import "sort"
|
|
||||||
|
|
||||||
type Pair[K comparable, V any] struct {
|
|
||||||
Key K
|
|
||||||
Value V
|
|
||||||
}
|
|
||||||
|
|
||||||
func SortMap[K comparable, V any](m map[K]V, less func(i, j Pair[K, V]) bool) []Pair[K, V] {
|
|
||||||
pairs := make([]Pair[K, V], 0, len(m))
|
|
||||||
for k, v := range m {
|
|
||||||
pairs = append(pairs, Pair[K, V]{k, v})
|
|
||||||
}
|
|
||||||
sort.Slice(pairs, func(i, j int) bool {
|
|
||||||
return less(pairs[i], pairs[j])
|
|
||||||
})
|
|
||||||
return pairs
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user