mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
vet
This commit is contained in:
@@ -33,7 +33,10 @@ type PluginBase struct {
|
||||
}
|
||||
|
||||
func (p *PluginBase) GRPCServer(broker *plugin.GRPCBroker, s *grpc.Server) error {
|
||||
proto.RegisterBasePluginServer(s, &basePluginServer{impl: p.impl})
|
||||
proto.RegisterBasePluginServer(s, &basePluginServer{
|
||||
impl: p.impl,
|
||||
broker: broker,
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -16,27 +16,27 @@ var (
|
||||
// testSpec is an hcl Spec for testing
|
||||
testSpec = &hclspec.Spec{
|
||||
Block: &hclspec.Spec_Object{
|
||||
&hclspec.Object{
|
||||
Object: &hclspec.Object{
|
||||
Attributes: map[string]*hclspec.Spec{
|
||||
"foo": &hclspec.Spec{
|
||||
"foo": {
|
||||
Block: &hclspec.Spec_Attr{
|
||||
&hclspec.Attr{
|
||||
Attr: &hclspec.Attr{
|
||||
Type: "string",
|
||||
Required: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
"bar": &hclspec.Spec{
|
||||
"bar": {
|
||||
Block: &hclspec.Spec_Attr{
|
||||
&hclspec.Attr{
|
||||
Attr: &hclspec.Attr{
|
||||
Type: "number",
|
||||
Required: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
"baz": &hclspec.Spec{
|
||||
"baz": {
|
||||
Block: &hclspec.Spec_Attr{
|
||||
&hclspec.Attr{
|
||||
Attr: &hclspec.Attr{
|
||||
Type: "bool",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -82,8 +82,6 @@ func decodeSpecBlock(spec *Spec, impliedName string) (hcldec.Spec, hcl.Diagnosti
|
||||
})
|
||||
return nil, diags
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func decodeObjectSpec(obj *Object) (hcldec.Spec, hcl.Diagnostics) {
|
||||
|
||||
@@ -46,7 +46,7 @@ func TestDec_Convert_Object(t *testing.T) {
|
||||
Block: &Spec_Object{
|
||||
&Object{
|
||||
Attributes: map[string]*Spec{
|
||||
"foo": &Spec{
|
||||
"foo": {
|
||||
Block: &Spec_Attr{
|
||||
&Attr{
|
||||
Type: "string",
|
||||
@@ -54,7 +54,7 @@ func TestDec_Convert_Object(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
"bar": &Spec{
|
||||
"bar": {
|
||||
Block: &Spec_Attr{
|
||||
&Attr{
|
||||
Type: "number",
|
||||
@@ -62,7 +62,7 @@ func TestDec_Convert_Object(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
"baz": &Spec{
|
||||
"baz": {
|
||||
Block: &Spec_Attr{
|
||||
&Attr{
|
||||
Type: "bool",
|
||||
@@ -106,7 +106,7 @@ func TestDec_Convert_Array(t *testing.T) {
|
||||
Block: &Spec_Array{
|
||||
Array: &Array{
|
||||
Values: []*Spec{
|
||||
&Spec{
|
||||
{
|
||||
Block: &Spec_Attr{
|
||||
&Attr{
|
||||
Name: "foo",
|
||||
@@ -115,7 +115,7 @@ func TestDec_Convert_Array(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
&Spec{
|
||||
{
|
||||
Block: &Spec_Attr{
|
||||
&Attr{
|
||||
Name: "bar",
|
||||
|
||||
Reference in New Issue
Block a user