Skip to content

Warn on unused parameter on exported functions #6

@martinlindhe

Description

@martinlindhe

The current snippet gives warning warning: some is unused.

package p

import "fmt"

func some(s string, n int) {
    fmt.Println(s)
    // n is unused
}

However, if the function is exported, then there is no warning.

No warning:

package p

import "fmt"

func Some(s string, n int) {
    fmt.Println(s)
    // n is unused
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions