<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Go on kenji.blog</title><link>http://kenji.blog/fr/tags/go/</link><description>Recent content in Go on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>fr</language><copyright>kenjinote</copyright><lastBuildDate>Sat, 10 Sep 2022 00:48:17 +0900</lastBuildDate><atom:link href="http://kenji.blog/fr/tags/go/index.xml" rel="self" type="application/rss+xml"/><item><title>Comment installer Go</title><link>http://kenji.blog/fr/p/comment-installer-go/</link><pubDate>Sat, 10 Sep 2022 00:48:17 +0900</pubDate><guid>http://kenji.blog/fr/p/comment-installer-go/</guid><description>&lt;img src="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/cover.png" alt="Featured image of post Comment installer Go" />&lt;h1 id="introduction">Introduction
&lt;/h1>&lt;p>Go est un langage de programmation relativement nouveau publié par Google en 2009.
Le compilateur, les outils et les bibliothèques de Go sont open source.
De plus, Go est un langage à typage statique comme C ou Java, mais il n&amp;rsquo;utilise pas de pointeurs comme le langage C.&lt;/p>
&lt;h1 id="méthode-dinstallation">Méthode d&amp;rsquo;installation
&lt;/h1>&lt;p>&lt;a class="link" href="https://go.dev/dl/" target="_blank" rel="noopener"
>Installer Go&lt;/a>&lt;/p>
&lt;p>Les programmes d&amp;rsquo;installation pour chaque plateforme sont publiés sur le site ci-dessus.&lt;/p>
&lt;p>Suivez les instructions à l&amp;rsquo;écran pour procéder à l&amp;rsquo;installation.
&lt;img src="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img.png"
width="495"
height="387"
srcset="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_hudec02a4f1dfaca9415d58a56d502b14f_18782_480x0_resize_box_3.png 480w, http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_hudec02a4f1dfaca9415d58a56d502b14f_18782_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img.png"
class="gallery-image"
data-flex-grow="127"
data-flex-basis="306px"
>&lt;/p>
&lt;p>&lt;img src="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_1.png"
width="495"
height="387"
srcset="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_1_hu803f0fb268a2cf0fa74e4e36a5b3a765_20314_480x0_resize_box_3.png 480w, http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_1_hu803f0fb268a2cf0fa74e4e36a5b3a765_20314_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_1.png"
class="gallery-image"
data-flex-grow="127"
data-flex-basis="306px"
>&lt;/p>
&lt;p>&lt;img src="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_2.png"
width="495"
height="387"
srcset="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_2_hu05fb3923212918b7539badd0200ea75c_11067_480x0_resize_box_3.png 480w, http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_2_hu05fb3923212918b7539badd0200ea75c_11067_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_2.png"
class="gallery-image"
data-flex-grow="127"
data-flex-basis="306px"
>&lt;/p>
&lt;p>&lt;img src="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_3.png"
width="495"
height="387"
srcset="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_3_hu316d63501ec24e1e74dc3cb674d4cc1f_11612_480x0_resize_box_3.png 480w, http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_3_hu316d63501ec24e1e74dc3cb674d4cc1f_11612_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_3.png"
class="gallery-image"
data-flex-grow="127"
data-flex-basis="306px"
>&lt;/p>
&lt;p>&lt;img src="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_5.png"
width="495"
height="387"
srcset="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_5_hu8bb188f8700bed3c70acaed6e511012d_14167_480x0_resize_box_3.png 480w, http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_5_hu8bb188f8700bed3c70acaed6e511012d_14167_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_5.png"
class="gallery-image"
data-flex-grow="127"
data-flex-basis="306px"
>&lt;/p>
&lt;p>&lt;img src="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_6.png"
width="495"
height="387"
srcset="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_6_hu0a1b7e9cf2cb725ed5a7ea7685880608_16796_480x0_resize_box_3.png 480w, http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_6_hu0a1b7e9cf2cb725ed5a7ea7685880608_16796_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_6.png"
class="gallery-image"
data-flex-grow="127"
data-flex-basis="306px"
>&lt;/p>
&lt;p>Installation terminée. Facile, n&amp;rsquo;est-ce pas ?&lt;/p>
&lt;h1 id="premier-programme">Premier programme
&lt;/h1>&lt;p>Enregistrez le programme suivant sous le nom &lt;code>hello.go&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;span class="lnt">7
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-go" data-lang="go">&lt;span class="line">&lt;span class="cl">&lt;span class="kn">package&lt;/span> &lt;span class="nx">main&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kn">import&lt;/span> &lt;span class="s">&amp;#34;fmt&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="kd">func&lt;/span> &lt;span class="nf">main&lt;/span>&lt;span class="p">()&lt;/span> &lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="nx">fmt&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="nf">Printf&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;Hello World\n&amp;#34;&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div>&lt;p>En exécutant &lt;code>go run hello.go&lt;/code> depuis l&amp;rsquo;invite de commande ou le terminal, &lt;code>Hello, world!&lt;/code> s&amp;rsquo;affichera.&lt;/p>
&lt;p>Pour compiler, l&amp;rsquo;exécution de &lt;code>go build hello.go&lt;/code> générera &lt;code>hello.exe&lt;/code>.
En exécutant &lt;code>hello.exe&lt;/code>, &lt;code>Hello, world!&lt;/code> s&amp;rsquo;affichera.&lt;/p>
&lt;h1 id="vous-pouvez-également-exécuter-du-code-sur-une-page-web">Vous pouvez également exécuter du code sur une page web
&lt;/h1>&lt;p>&lt;a class="link" href="https://go.dev/play/" target="_blank" rel="noopener"
>https://go.dev/play/&lt;/a>&lt;/p>
&lt;p>&lt;img src="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_7.png"
width="793"
height="668"
srcset="http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_7_hu4549f097b6cd8fd929d9562692076ffb_15605_480x0_resize_box_3.png 480w, http://kenji.blog/p/go%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95/images/img_7_hu4549f097b6cd8fd929d9562692076ffb_15605_1024x0_resize_box_3.png 1024w"
loading="lazy"
alt="img_7.png"
class="gallery-image"
data-flex-grow="118"
data-flex-basis="284px"
>&lt;/p>
&lt;h1 id="documentation-japonaise">Documentation japonaise
&lt;/h1>&lt;p>&lt;a class="link" href="http://go.shibu.jp/" target="_blank" rel="noopener"
>http://go.shibu.jp/&lt;/a>&lt;/p>
&lt;p>Les explications nécessaires pour apprendre Go sont regroupées dans le lien ci-dessus (version traduite en japonais).
La technologie liée à Go est tellement ouverte et riche qu&amp;rsquo;il n&amp;rsquo;est presque pas nécessaire d&amp;rsquo;acheter des textes papier.&lt;/p>
&lt;p>Alors, profitez bien de Go !&lt;/p></description></item></channel></rss>