Registry /
utility / vincent-petithory-dataurl
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
dataurl
✓ github.com/vincent-petithory/dataurl
Decodes a data URL string and prints its MIME type and content.
package main
import (
"fmt"
"github.com/vincent-petithory/dataurl"
)
func main() {
dataURL, err := dataurl.DecodeString("data:text/plain;base64,SGVsbG8sIFdvcmxkIQ==")
if err != nil {
panic(err)
}
fmt.Printf("MIME type: %s\n", dataURL.MediaType.Type)
fmt.Printf("Data: %s\n", string(dataURL.Data))
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.0.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.