Fmt Println number of returned bytes

(Coco Petrut) #1


i’ve just started to learn go and the first function used is fmt.Println(). According to the documentation: “It returns the number of bytes written[…]”

Can you please explain me why i am receiving one extra byte?

Thank you

(Sandertv) #2

Println means the function prints a line: That includes the \n written at the end.

(Coco Petrut) #3

Ahh…my mistake.
// Spaces are always added between operands and a newline is appended.

(Sean Killian) #4

Hi, @Coco_Petrut, can you mark this issue as resolved?

(system) closed #5

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.