mirror of
https://github.com/kovetskiy/mark.git
synced 2026-05-02 13:22:40 +00:00
refactor: modernize Go primitives
- Replace interface{} with any (Go 1.18) across confluence/api.go,
macro/macro.go, util/cli.go, util/error_handler.go, includes/templates.go
- Replace sort.SliceStable with slices.SortStableFunc + cmp.Compare (Go 1.21)
in attachment/attachment.go, consistent with existing slices usage
- Replace fmt.Errorf("%s", msg) with errors.New(msg) in mark.go
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -75,7 +75,7 @@ func ProcessIncludes(
|
||||
templates *template.Template,
|
||||
) (*template.Template, []byte, bool, error) {
|
||||
formatVardump := func(
|
||||
data map[string]interface{},
|
||||
data map[string]any,
|
||||
) string {
|
||||
var parts []string
|
||||
for key, value := range data {
|
||||
@@ -105,7 +105,7 @@ func ProcessIncludes(
|
||||
left = string(groups[3])
|
||||
right = string(groups[4])
|
||||
config = groups[5]
|
||||
data = map[string]interface{}{}
|
||||
data = map[string]any{}
|
||||
)
|
||||
|
||||
if delimsNone == "none" {
|
||||
|
||||
Reference in New Issue
Block a user