Imprimir en golang

Ejemplos de código

2
0

imprimir en golang

package Main
//you need to import fmt
import ("fmt")

func main(){
	//then you can use:
	fmt.Print("this message will be printed without a linefeed at the end")
	//or
	fmt.Println("this message will be printed with a linefeed a the end")
	//or										   the \n is a line feed
 	fmt.Printf("You can also use %s formatings with Printf \n (PS : this message won't end with a line feed)","multiples")
  	// will output :
  	/*You can also use multiples formatings with Printf 
      (PS : this message won't end with a line feed)*/
}
// More infos at https://golang.org/pkg/fmt/ or in the source
1
0

formato cadena ir

fmt.Sprintf("foo: %s", bar)
0
0

formato cadena ir

return fmt.Sprintf("at %v, %s", e.When, e.What)

En otros idiomas

Esta página está en otros idiomas

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................