
Brought over the .golangci.yaml file from airshipctl Made necessiary corrections based on it The goimports section in .golangi.yaml will need to be addressed, not currently working for airshipui Change-Id: I43973224703408a3320e43a59b4639d6d3edd1ca
29 lines
697 B
Go
Executable File
29 lines
697 B
Go
Executable File
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
|
|
"opendev.org/airship/airshipui/internal/environment"
|
|
plugin "opendev.org/airship/airshipui/internal/plugin/openstack"
|
|
)
|
|
|
|
var pluginName = "openstack"
|
|
|
|
func main() {
|
|
// Remove the prefix from the go logger since Octant will print logs with timestamps.
|
|
log.SetPrefix("")
|
|
|
|
description := fmt.Sprintf("%s version %s", pluginName, environment.Version())
|
|
|
|
// Use the plugin service helper to register this plugin.
|
|
p, err := plugin.Register(pluginName, description)
|
|
if err != nil {
|
|
log.Fatal("Unable to start ", pluginName, err)
|
|
}
|
|
|
|
// The plugin can log and the log messages will show up in Octant.
|
|
log.Printf("%s is starting", pluginName)
|
|
p.Serve()
|
|
}
|