constructor

package module
v0.0.0-...-8a30596 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: MIT Imports: 4 Imported by: 0

README

constructor PkgGoDev

constructor constructor reports whether name of a constructor like function does not begin "New".

A constructor like function:

  • Requests named struct type or its pointer
  • Requests one or two value, last value must be an error
  • Exported function and it is not method
type T1 struct{}

func NewT1() (t *T1) { return } // OK

func CreateT1() (t *T1) { return } // want `name of a constructor like function must begin "New"`

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "constructor",
	Doc:  doc,
	Run:  run,
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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