Browse Source

Version 0.3

master
Patrick Foubet 1 year ago
parent
commit
58ab632f9d
11 changed files with 90 additions and 0 deletions
  1. BIN
      hello/hello
  2. +10
    -0
      hello/hello.go
  3. +3
    -0
      packages/file1.go
  4. +3
    -0
      packages/file2.go
  5. +7
    -0
      packages/main.go
  6. +9
    -0
      testexport/affiche/affiche.go
  7. +3
    -0
      testexport/go.mod
  8. +20
    -0
      testexport/main.go
  9. +10
    -0
      testimport/go.mod
  10. +13
    -0
      testimport/go.sum
  11. +12
    -0
      testimport/main.go

BIN
hello/hello View File


+ 10
- 0
hello/hello.go View File

@@ -0,0 +1,10 @@
package main

import (
"fmt"
)

func main() {
fmt.Println("Bonjour tout le Monde")
}


+ 3
- 0
packages/file1.go View File

@@ -0,0 +1,3 @@
package main

var data1 string = "Salut"

+ 3
- 0
packages/file2.go View File

@@ -0,0 +1,3 @@
package main

var data2 = "tout le monde"

+ 7
- 0
packages/main.go View File

@@ -0,0 +1,7 @@
package main

import "fmt"

func main() {
fmt.Println(data1, data2)
}

+ 9
- 0
testexport/affiche/affiche.go View File

@@ -0,0 +1,9 @@
package affiche

var data = "E2L !"
var Number = 99

type Message struct {
Greeting string
voice string
}

+ 3
- 0
testexport/go.mod View File

@@ -0,0 +1,3 @@
module githell.e2li.org/Patrick/LeGoEn10Etapes/testexport

go 1.19

+ 20
- 0
testexport/main.go View File

@@ -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
}


+ 10
- 0
testimport/go.mod View File

@@ -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
)

+ 13
- 0
testimport/go.sum View File

@@ -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=

+ 12
- 0
testimport/main.go View File

@@ -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")
}

Loading…
Cancel
Save