langver

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package langver reports the Go language version in effect for the code under analysis, so a diagnostic only names a fix the analyzed package is allowed to compile.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenericMethodAdvice

func GenericMethodAdvice(pass *analysis.Pass, stack []ast.Node) bool

GenericMethodAdvice reports whether a diagnostic about the func type at the top of stack may propose a method type parameter: the func type is a concrete method declaration, the file is at Go 1.27 or newer, and the method does not already declare type parameters.

The concrete-method distinction carries the advice. An interface method may not declare type parameters, nor may a generic method implement one, so an interface method -- like a plain func declaration, a func literal, or a func type in a field, a variable, or a type declaration -- keeps the non-generic wording.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL