impl

impl generates method stubs for implementing an interface.

  • Owner: josharian/impl
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

impl generates method stubs for implementing an interface.

go get -u github.com/josharian/impl

Sample usage:

$ impl 'f *File' io.ReadWriteCloser
func (f *File) Read(p []byte) (n int, err error) {
	panic("not implemented")
}

func (f *File) Write(p []byte) (n int, err error) {
	panic("not implemented")
}

func (f *File) Close() error {
	panic("not implemented")
}

# You can also provide a full name by specifying the package path.
# This helps in cases where the interface can't be guessed
# just from the package name and interface name.
$ impl 's *Source' golang.org/x/oauth2.TokenSource
func (s *Source) Token() (*oauth2.Token, error) {
    panic("not implemented")
}

You can use impl from Vim with vim-go-impl

Main metrics

Overview
Name With Ownerjosharian/impl
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2014-07-19 00:37:33
Pushed At2024-06-24 23:29:12
Last Commit At
Release Count5
Last Release Namev1.4.0 (Posted on )
First Release Namev1.0.0 (Posted on )
用户参与
Stargazers Count1.1k
Watchers Count9
Fork Count90
Commits Count49
Has Issues Enabled
Issues Count20
Issue Open Count5
Pull Requests Count23
Pull Requests Open Count0
Pull Requests Close Count9
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private