aboutsummaryrefslogtreecommitdiff
path: root/attribute_entry.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-08-13 07:35:12 +0700
committerShulhan <ms@kilabit.info>2024-08-13 07:38:35 +0700
commitb8fdcc2be2fcae1bfd3dd62b8bc2d4abe75e78d0 (patch)
tree6572805cdfff4a9fa6c2a17337c977ae4a202674 /attribute_entry.go
parent741463b99f14f1869c804cd4c6b15be155a7c27e (diff)
downloadasciidoctor-go-b8fdcc2be2fcae1bfd3dd62b8bc2d4abe75e78d0.tar.xz
all: rename struct "AttributeEntry" to "DocumentAttribute"
This is to make the struct is clear that it represent the document attribute.
Diffstat (limited to 'attribute_entry.go')
-rw-r--r--attribute_entry.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/attribute_entry.go b/attribute_entry.go
deleted file mode 100644
index 98db699..0000000
--- a/attribute_entry.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// SPDX-FileCopyrightText: 2020 M. Shulhan <ms@kilabit.info>
-// SPDX-License-Identifier: GPL-3.0-or-later
-
-package asciidoctor
-
-import "strings"
-
-// AttributeEntry contains the mapping of global attribute keys in the headers
-// with its value.
-type AttributeEntry map[string]string
-
-func newAttributeEntry() AttributeEntry {
- return AttributeEntry{
- MetaNameGenerator: `asciidoctor-go ` + Version,
- metaNameLastUpdateLabel: `Last updated`,
- metaNameLastUpdateValue: ``,
- metaNameSectIDs: ``,
- metaNameShowTitle: ``,
- metaNameTableCaption: ``,
- metaNameVersionLabel: ``,
- }
-}
-
-func (entry *AttributeEntry) apply(key, val string) {
- switch {
- case key[0] == '!':
- delete(*entry, strings.TrimSpace(key[1:]))
- case key[len(key)-1] == '!':
- delete(*entry, strings.TrimSpace(key[:len(key)-1]))
- default:
- (*entry)[key] = val
- }
-}