katas

package
v0.0.0-...-a6e5ec5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: CC-BY-SA-4.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Defer

func Defer()

Defer closes an openned file. Does the code behave as expected?

func Fallthrough

func Fallthrough(day string) string

Fallthrough goes decides whether day is a weekday or weekend. However, it does not seem to work for some days. Fix it.

func Fizzbuzz

func Fizzbuzz(number int) string

Fizzbuzz is a well-known interview task. If you need to refresh your mind, you can consult wikipedia: https://en.wikipedia.org/wiki/Fizz_buzz. You may want to explore the strconv package: https://pkg.go.dev/strconv. Implement it.

func Shadowing

func Shadowing(environment string)

Shadowing create a new logger depending on environment. However, if you run it it panics. Find out why and fix it.

func Switch

func Switch()

Switch iterates over numbers and based on two predicates either sums, ignores them or exits the loop. However, it currently seems to be stuck in the loop. Fit it while avoiding the "if" statement.

Types

type Person

type Person struct {
	Name string
}

func (Person) Rename

func (p Person) Rename(name string)

Rename renames a person. However, it does not seem to work. Fix it.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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