Compare commits

...

2 Commits

Author SHA1 Message Date
db88502414
docs: add packages docs
All checks were successful
submodules sync / sync (push) Successful in 44s
build / build (push) Successful in 1m24s
build / trigger-build-image (push) Successful in 11s
2025-02-21 12:28:42 -05:00
787e0526dc
chore(pkg): remove unused util 2025-02-21 12:28:34 -05:00
4 changed files with 4 additions and 20 deletions

View File

@ -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
import (

1
cmd/joj3/env/env.go vendored
View File

@ -1,3 +1,4 @@
// Package env stores the environment variables from actions environment.
package env
import (

View File

@ -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
import (
@ -6,6 +5,7 @@ import (
"strings"
)
// Referenced from https://github.com/yuriisk/clang-tidy-converter/blob/master/clang_tidy_converter/parser/clang_tidy_parser.py
type JsonMessage struct {
Type string `json:"type"`
CheckName string `json:"checkname"`

View File

@ -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
}