Skip to content

thoughts on code examples [err] #36

Open
@TotallyNotAHaxxer

Description

was looking throuh some of the code files and i noticed you use

	if err != nil {
		log.Fatalln(err)
	}

in most samples, my thought on this is why not add modules? or a function in another module file to handel errors where the function looks similar to this

func CheckErr(err error, format string) {
                if err != nil {
                      if format == "log" {log.fatalln(err)}
                 }
}

and just advance the code from there, idk if thats just a me thing but i feel like it would be great to do in a sense of code optimization

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions