summaryrefslogtreecommitdiff
path: root/vendor/github.com/dsoprea/go-exif/v2/undefined/registration.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2022-02-12 18:27:58 +0000
committerLibravatar GitHub <noreply@github.com>2022-02-12 18:27:58 +0000
commit31935ee206107f077878d3cdb6a26b82436b6893 (patch)
tree2d522bf98013dc5a4539133561b645fd7457eb06 /vendor/github.com/dsoprea/go-exif/v2/undefined/registration.go
parent[chore] Add nightly mirror to Codeberg.org (#392) (diff)
parentGo mod tidy (diff)
downloadgotosocial-31935ee206107f077878d3cdb6a26b82436b6893.tar.xz
Merge pull request #361 from superseriousbusiness/media_refactorv0.2.0
Refactor media handler to allow async media resolution
Diffstat (limited to 'vendor/github.com/dsoprea/go-exif/v2/undefined/registration.go')
-rw-r--r--vendor/github.com/dsoprea/go-exif/v2/undefined/registration.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/vendor/github.com/dsoprea/go-exif/v2/undefined/registration.go b/vendor/github.com/dsoprea/go-exif/v2/undefined/registration.go
deleted file mode 100644
index cccc20a82..000000000
--- a/vendor/github.com/dsoprea/go-exif/v2/undefined/registration.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package exifundefined
-
-import (
- "github.com/dsoprea/go-logging"
-)
-
-// UndefinedTagHandle defines one undefined-type tag with a corresponding
-// decoder.
-type UndefinedTagHandle struct {
- IfdPath string
- TagId uint16
-}
-
-func registerEncoder(entity EncodeableValue, encoder UndefinedValueEncoder) {
- typeName := entity.EncoderName()
-
- _, found := encoders[typeName]
- if found == true {
- log.Panicf("encoder already registered: %v", typeName)
- }
-
- encoders[typeName] = encoder
-}
-
-func registerDecoder(ifdPath string, tagId uint16, decoder UndefinedValueDecoder) {
- uth := UndefinedTagHandle{
- IfdPath: ifdPath,
- TagId: tagId,
- }
-
- _, found := decoders[uth]
- if found == true {
- log.Panicf("decoder already registered: %v", uth)
- }
-
- decoders[uth] = decoder
-}
-
-var (
- encoders = make(map[string]UndefinedValueEncoder)
- decoders = make(map[UndefinedTagHandle]UndefinedValueDecoder)
-)