Skip to content

lance6716/errhell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

errhell

A preprocessor for golang to generate notorious if err != nil {...}.

Example

Input:

package main

func main() {
	returnErr().try
}

func returnErr() error {
	return nil
}
bin/errhell ./test.go

Output:

package main

func main() {
	_err0 := returnErr()
	if _err0 != nil {
		return
	}
}

func returnErr() error {
	return nil
}

You can find more example in test/input/input.go.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published