1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 07:22:50 -05:00

core: replace all use of interface{} with any (#848)

This commit is contained in:
Marcus Ramberg
2025-12-01 17:04:37 +01:00
committed by GitHub
parent cfc07f4411
commit 94851a51aa
60 changed files with 336 additions and 334 deletions

View File

@@ -23,7 +23,7 @@ func NewAttributeEncoder(w io.Writer) *AttributeEncoder {
// Encode encodes a attribute and its value to a io.Writer
// the tag is determined by the AttributeTagMapping map
func (e *AttributeEncoder) Encode(attribute string, value interface{}) error {
func (e *AttributeEncoder) Encode(attribute string, value any) error {
tag, ok := AttributeTagMapping[attribute]
if !ok {
return fmt.Errorf("cannot get tag of attribute %s", attribute)
@@ -346,7 +346,7 @@ func (e *AttributeEncoder) writeNullByte() error {
type Attribute struct {
Tag int8
Name string
Value interface{}
Value any
}
// Resolution defines the resolution attribute