Skip to content

Commit

Permalink
Add more info in function description
Browse files Browse the repository at this point in the history
  • Loading branch information
sashamelentyev committed Sep 24, 2022
1 parent b329728 commit 5da3638
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ func checkConstantKind(pass *analysis.Pass, basicLit *ast.BasicLit) {
// getBasicLitFromArgs gets the *ast.BasicLit of a function argument.
//
// Arguments:
// - args - slice of function arguments
// - count - expected number of argument in function
// - idx - index of the argument to get the *ast.BasicLit
// - typ - argument type
Expand Down Expand Up @@ -481,7 +482,8 @@ func getBasicLitFromArgs(args []ast.Expr, count, idx int, typ token.Token) *ast.
// getBasicLitFromElts gets the *ast.BasicLit of a struct elements.
//
// Arguments:
// - key: name of key in struct
// - elts - slice of a struct elements
// - key - name of key in struct
func getBasicLitFromElts(elts []ast.Expr, key string) *ast.BasicLit {
for _, e := range elts {
keyValueExpr, ok := e.(*ast.KeyValueExpr)
Expand Down

0 comments on commit 5da3638

Please sign in to comment.