Plugins: Standardize Golang enum naming convention (#69449)

* standardize enum pattern

* fix up
This commit is contained in:
Will Browne
2023-06-08 12:21:19 +02:00
committed by GitHub
parent 4db6679460
commit a221e1d226
31 changed files with 308 additions and 306 deletions

View File

@ -24,7 +24,7 @@ func ProvideService(cdn *pluginscdn.Service) *Service {
// Base returns the base path for the specified plugin.
func (s *Service) Base(pluginJSON plugins.JSONData, class plugins.Class, pluginDir string) (string, error) {
if class == plugins.Core {
if class == plugins.ClassCore {
return path.Join("public/app/plugins", string(pluginJSON.Type), filepath.Base(pluginDir)), nil
}
if s.cdn.PluginSupported(pluginJSON.ID) {
@ -35,7 +35,7 @@ func (s *Service) Base(pluginJSON plugins.JSONData, class plugins.Class, pluginD
// Module returns the module.js path for the specified plugin.
func (s *Service) Module(pluginJSON plugins.JSONData, class plugins.Class, pluginDir string) (string, error) {
if class == plugins.Core {
if class == plugins.ClassCore {
return path.Join("app/plugins", string(pluginJSON.Type), filepath.Base(pluginDir), "module"), nil
}
if s.cdn.PluginSupported(pluginJSON.ID) {