• Stars
    star
    38
  • Rank 682,802 (Top 14 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 6 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Check that no init functions are present in Go code.

gochecknoinits

Build Status Go Report Card

Check that no inits functions are present in Go code.

Why

Init functions cause an import to have side effects, and side effects are hard to test, reduce readability and increase the complexity of code.

https://peter.bourgon.org/blog/2017/06/09/theory-of-modern-go.html https://twitter.com/davecheney/status/871939730761547776

Install

go get 4d63.com/gochecknoinits

Usage

gochecknoinits
gochecknoinits ./...
gochecknoinits [path] [path] [path] [etc]

Add -t to include tests.

gochecknoinits -t [path]

Note: Paths are only inspected recursively if the Go /... recursive path suffix is appended to the path.

More Repositories

1

vagrant-docker-compose

A Vagrant provisioner for docker compose.
Ruby
605
star
2

docker-unison

A docker data container using Unison for fast folder sync. An alternative to slow boot2docker volumes on OS X.
Shell
167
star
3

AppSandboxFileAccess

A class that wraps up writing and accessing files outside a Mac apps App Sandbox files into a simple interface. The class will request permission from the user with a simple to understand dialog consistent with Apple's documentation and persist permissions across application runs.
Objective-C
112
star
4

gochecknoglobals

Check that no globals are present in Go code.
Go
100
star
5

looks.wtf

A collection of looks. (β–°Λ˜β—‘Λ˜β–°)
JavaScript
83
star
6

vangen

Tool for generating static HTML for Go vanity import paths.
Go
74
star
7

keywords

A list and count of keywords in programming languages.
Go
73
star
8

sshcrypt

Tool for signing/encrypting with the SSH Agent.
Go
52
star
9

middleman-cdn

Middleman extension automating invalidation of CloudFlare, MaxCDN, AWS CloudFront, Fastly and Rackspace CDN caches.
Ruby
41
star
10

go-optional

A go package for wrapping types with Optionals to represent the lack of value without pointers.
Go
38
star
11

acceptedlanguages.js

A browser abstraction JavaScript library that tells you page and visitor language information like the accepted languages of the visitor and the current, alternate and relevant languages of the current page.
JavaScript
32
star
12

tldr

Simplified and community-driven man pages (tldr-pages) in a single binary.
Go
32
star
13

go-tz

Go package to predictably load time.Locations regardless of operating system.
Go
30
star
14

dockerhost

A tool for simply creating a docker host vm on macOS.
Shell
16
star
15

embedfiles

Embedfiles embeds files into a map in a Go file.
Go
16
star
16

filecache-ruby

A ruby gem that implements a file-based cache
Ruby
15
star
17

CocoaHash

Categories for NSData and NSString for the hashing algorithms supported by CommonCrypto. MD2, MD4, MD5, SHA1, SHA224, SHA256, SHA384, SHA512.
Objective-C
13
star
18

gas

Check the state of all your git worktrees.
Go
10
star
19

githubcloneall

Clone all github repositories for a user.
Go
9
star
20

windows-10-bash-aliases

Run Bash-on-Ubuntu-on-Windows commands directly from the Windows 10 CMD prompt.
Batchfile
9
star
21

tmux-colours-superhero

A tmux colour theme that likes yellow and shades of grey.
Shell
7
star
22

gaplaylength.js

A Google Analytics plugin that measures engagement with HTML5 audio/video content.
JavaScript
6
star
23

biblestories.org

Bible Stories presents the bible as short stories. Jump in, read a story and share it.
SCSS
6
star
24

clippercard

Tools and packages relating to ClipperCard.
Go
6
star
25

google-cloud-appengine-datastore-replicator

Package and AppEngine app to replicate Datastore across regions.
Go
6
star
26

pdf-page-count

A command line application that will count the number of pages in multiple or individual PDFs. It can recursively traverse multiple directories and sum the total pages.
Ruby
6
star
27

spiffy

A simple to use markdown to HTML and PDF command line app. Supports Github flavored markdown and great for converting single or many documents into professional PDFs using ERB/HAML templates and CSS.
CSS
5
star
28

dnsovertlsproxy

A simple DNS over TLS proxy.
Go
5
star
29

5tweets

Quickly format multi-tweet tweets!
Ruby
5
star
30

vagrant-docker-login

A Vagrant provisioner for docker login. Login to your docker repository automatically as part of your Vagrant setup.
Ruby
5
star
31

soroban-webauthn

Soroban Webauth Account Contract
JavaScript
5
star
32

devenv

My personal development environment.
4
star
33

go-testparallel

Go package that provides a function for making all tests in a suite run in Parallel without adding t.Parallel() to every test.
Go
4
star
34

vim_dotfiles

My vim dotfiles.
Vim Script
3
star
35

clone

Clone personal GitHub repositories conveniently.
Go
3
star
36

go-collapsewhitespace

Compact multiple whitespace characters in a string into a single space.
Go
3
star
37

gocheckcompilerdirectives

Check that go directories (//go: comments) are good.
Go
3
star
38

acceptedlanguagesui.js

A simple UI that offers your website to your visitor in its alternate languages.
JavaScript
3
star
39

soroban-fiddle

Displaying data for the Soroban Futurenet.
Rust
3
star
40

randstr

Tool for generating random strings (e.g. passwords) supporting unicode and emojis.
Go
3
star
41

keybase-bot-weather

Keybase bot that posts weather information to a channel that has asked for it.
Go
2
star
42

dotfiles

Shell
2
star
43

4d63.com

A vanity URL for go packages by Leigh McCulloch.
Makefile
2
star
44

demo-google-cloud-appengine-twirp

A demonstration of how to use twirp on Google Cloud AppEngine.
Go
2
star
45

deno-embed

Embed files into demo applications by embedding them into a JSON file and importing natively into the demo app.
TypeScript
2
star
46

vscode-extension-status-bar-env-var

TypeScript
1
star
47

docker-helloworld-elixir

Elixir hello world!
Elixir
1
star
48

action-cla-test

1
star
49

go-makefile

A go package for parsing makefiles.
Go
1
star
50

exp-solana

Dockerfile
1
star
51

exp-lume

TypeScript
1
star
52

exp-move

Dockerfile
1
star
53

go-uuid

A go package for typing and generating UUIDs.
Go
1
star
54

go-structmap

A go package for converting structs to maps, and maps to structs.
Go
1
star
55

stellar-quickstart-fly.io

1
star
56

helloworld

Helloworlds in each language, also compiled into minimal docker images.
Elixir
1
star
57

zsh-theme-enormous

A zsh theme, that takes up an enormous amount of space in the terminal.
Makefile
1
star
58

jif.wtf

An alternative to searching for gifs on Giphy.
JavaScript
1
star
59

gravitybeam

Go
1
star
60

kanban-everywhere

Kanban Everywhere is a Windows/Mac application for using Kanban locally without sending data elsewhere. It is an extension of Simple Kanban which saves data to disk and uses appjs to run as a desktop app. Like Simple Kanban, Kanban Everywhere is licensed under MIT. To use just go to the downloads page and download the latest tag and read the README for how to run.
HTML
1
star
61

go-biblestats

Go
1
star
62

spellingalphabet.xyz

Type a message and get the spelling alphabet to read for it.
JavaScript
1
star
63

sjc

CLI tool for prototyping contracts for Stellar Jump Cannon.
TypeScript
1
star
64

deplockgomoddiff

A tool for comparing the dependency graph of Go Dep's Gopkg.lock file and the output of Go Modules 'go list -m all' command.
Go
1
star
65

emlx

Email file (.eml) attachment and embedded file extractor.
Go
1
star
66

rssfeedreader

An online RSS feed reader.
Go
1
star
67

gocheckregex

Check that regular expressions in global `MustCompile` calls are valid.
Go
1
star
68

tcpwait

Wait for TCP ports to be open.
Go
1
star
69

makenft

JavaScript
1
star
70

JSMin

JavaScript Minification Filter
C
1
star
71

go-iszero

A go package for checking if a value is zero.
Go
1
star
72

stellar--soroban-transaction-invoke-example

Rust
1
star
73

docker-helloworld-go

Go hello world!
Go
1
star
74

hasdic

A hashing dictionary application that can create an SQLite based dictionary of hashing to data portions. The data hashed may be text or binary. Something I wrote for fun one way to see how easy or hard it would be without a GPU to produce such a dictionary.
C#
1
star
75

go-errors

Go
1
star
76

parcel-bundler--parcel--issue-5883

JavaScript
1
star