go-clean-interface

module
v0.0.0-...-c4a98f8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: MIT

README

go-clean-interface

Checks interface declarations for unnecessary I prefixes or Itf suffixes.

Why?

Main Reasoning

Prefixing interfaces with I or suffixing them with Itf is leftover convention from Java and C#. When we are writing code with clean architecture as a guideline, whatever we pass as a dependency should be expected as an interface.

Interfaces shouldn't be treated as a special language feature that requires special naming conventions.

Installation

go install github.com/Namchee/go-clean-interface@latest

Usage

go-clean-interface [-flag] [package]

Options

All options are provided through CLI flags.

Name Type Default Description
no-prefix bool true Disallow interface declarations to be prefixed with I
no-suffix bool true Disallow interface declarations to be suffixed with Itf

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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