| @@ -0,0 +1,10 @@ | |||||
| package main | |||||
| import ( | |||||
| "fmt" | |||||
| ) | |||||
| func main() { | |||||
| fmt.Println("Bonjour tout le Monde") | |||||
| } | |||||
| @@ -0,0 +1,3 @@ | |||||
| package main | |||||
| var data1 string = "Salut" | |||||
| @@ -0,0 +1,3 @@ | |||||
| package main | |||||
| var data2 = "tout le monde" | |||||
| @@ -0,0 +1,7 @@ | |||||
| package main | |||||
| import "fmt" | |||||
| func main() { | |||||
| fmt.Println(data1, data2) | |||||
| } | |||||
| @@ -0,0 +1,9 @@ | |||||
| package affiche | |||||
| var data = "E2L !" | |||||
| var Number = 99 | |||||
| type Message struct { | |||||
| Greeting string | |||||
| voice string | |||||
| } | |||||
| @@ -0,0 +1,3 @@ | |||||
| module githell.e2li.org/Patrick/LeGoEn10Etapes/testexport | |||||
| go 1.19 | |||||
| @@ -0,0 +1,20 @@ | |||||
| package main | |||||
| import ( | |||||
| "fmt" | |||||
| "githell.e2li.org/Patrick/LeGoEn10Etapes/testexport/affiche" | |||||
| ) | |||||
| func main() { | |||||
| m := print.Message{ | |||||
| Greeting: "Salut", | |||||
| } | |||||
| fmt.Println(print.Number) | |||||
| fmt.Println(m.voice) | |||||
| // fmt.Println(print.data) | |||||
| } | |||||
| func Export() int { | |||||
| return 42 | |||||
| } | |||||
| @@ -0,0 +1,10 @@ | |||||
| module testimport | |||||
| go 1.19 | |||||
| require ( | |||||
| github.com/mattn/go-colorable v0.1.12 // indirect | |||||
| github.com/mattn/go-isatty v0.0.14 // indirect | |||||
| github.com/rs/zerolog v1.28.0 // indirect | |||||
| golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 // indirect | |||||
| ) | |||||
| @@ -0,0 +1,13 @@ | |||||
| github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= | |||||
| github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= | |||||
| github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= | |||||
| github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= | |||||
| github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= | |||||
| github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= | |||||
| github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= | |||||
| github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= | |||||
| github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= | |||||
| github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= | |||||
| golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |||||
| golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 h1:foEbQz/B0Oz6YIqu/69kfXPYeFQAuuMYFkjaqXzl5Wo= | |||||
| golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= | |||||
| @@ -0,0 +1,12 @@ | |||||
| package main | |||||
| import ( | |||||
| "fmt" | |||||
| // reference au compte github d'Olivier Poitrey !! | |||||
| "github.com/rs/zerolog/log" | |||||
| ) | |||||
| func main() { | |||||
| fmt.Println("Salut tout le Monde") | |||||
| log.Print("Salut tout le Monde") | |||||
| } | |||||