mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 16:23:11 +08:00
Plugins: Standardize Golang enum naming convention (#69449)
* standardize enum pattern * fix up
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user