From 0797dd68db9b67299e4f2c24f0ad038d6fddede6 Mon Sep 17 00:00:00 2001 From: Tiago Collot Date: Mon, 29 Aug 2022 11:13:35 +0100 Subject: [PATCH] style(pisicine-go): fix white-space and formatting --- subjects/loafofbread/README.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/subjects/loafofbread/README.md b/subjects/loafofbread/README.md index 39ad4e09..c289610d 100644 --- a/subjects/loafofbread/README.md +++ b/subjects/loafofbread/README.md @@ -4,9 +4,9 @@ Write a function `LoafOfBread()` that takes a string and returns another one with words of 5 characters and skips the next character followed by newline `\n`. -- If there is a space in the middle of a word it should ignore it and get the first character until getting to a length of 5. -- If the string less than 5 characters returns "Invalid Output\n" -- +- If there is a space in the middle of a word it should ignore it and get the next character until getting to a length of 5. +- If the string is less than 5 characters return "Invalid Output\n". + ### Expected function ```go @@ -16,7 +16,7 @@ func LoafOfBread(str string) string { ### Usage -Here is a possible program to test your function : +Here is a possible program to test your function: ```go package main @@ -24,21 +24,17 @@ package main import "fmt" func main() { - LoafOfBread("deliciousbread") - LoafOfBread("This is a loaf of bread") - LoafOfBread("Bread crumbles") fmt.Print(LoafOfBread("deliciousbread")) fmt.Print(LoafOfBread("This is a loaf of bread")) fmt.Print(LoafOfBread("loaf")) } ``` -And its output : +And its output: ```go $ go run . | cat -e delic ousbr ad$ -Thisi ashor sente ce$ -This s a l af of bread$ +Thisi aloaf fbrea$ Invalid Output$ ```