func init() { //register the type on init factory := func() core.Inspecter { return &Mp4Video{} } //my mp4 code should work fine with .m4v and .mov types core.RegisterType("video/mp4", factory) core.RegisterType("video/x-m4v", factory) core.RegisterType("video/quicktime", factory) }
//register the type on init func init() { //we should register this mime type in our mime-type to file extension list. it really doesn't exist. //we'll use .tag mime.AddExtensionType(TAG_FILE_EXT, TAG_MIME_TYPE) core.RegisterType(TAG_MIME_TYPE, func() core.Inspecter { return &Tag{} }) }
//register the type on init func init() { core.RegisterType("image/jpeg", func() core.Inspecter { return &JpegPhoto{} }) }