We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 445fe3c + 6d1fe8f commit aeba4fbCopy full SHA for aeba4fb
internal/languages/golang/models.go
@@ -36,6 +36,22 @@ func (n *LGolangNode) FillDefaults() error {
36
}
37
38
39
+ if n.LanguageNode.GrpcConfig != nil && n.LanguageNode.GrpcConfig.Server != nil && n.LanguageNode.GrpcConfig.Server.Resources != nil {
40
+ for _, resource := range n.LanguageNode.GrpcConfig.Server.Resources {
41
+ if resource.AllowedMethods == nil {
42
+ defaultMethods := []string{"GET", "POST", "PUT", "DELETE"}
43
+ stringPointers := func() []*string {
44
+ s := make([]*string, len(defaultMethods))
45
+ for i := range defaultMethods {
46
+ s[i] = &defaultMethods[i]
47
+ }
48
+ return s
49
+ }()
50
+
51
+ resource.AllowedMethods = stringPointers
52
53
54
55
56
return nil
57
0 commit comments