Slide 1

Slide 1 text

(Pݚमୈظ %": :VUBLB,BUP 
 3% %&4".*4 %&4".*4ࣾ಺ݚम

Slide 2

Slide 2 text

˞ લճͷ13ͷ 
 ղઆλΠϜ

Slide 3

Slide 3 text

ຊ೔ͷΰʔϧ w 🚩ΰʔϧ w (PͷجຊతͳϓϩάϥϜߏ଄Λशಘ͢Δ w (Pͷجຊσʔλܕʹ͍ͭͯशಘ͢Δ w ❌ΰʔϧͰ͸ͳ͍ w (Pͷશͯͷߏจ΍σʔλߏ଄Λशಘ͢Δ

Slide 4

Slide 4 text

ݚमܭը ճ ೔࣍ ༧ఆ λΠτϧ ୈճ Ր (Pͷجຊ ୈճ Ր ؀ڥߏஙͱ(JU (JU)VCͷجຊ ୈճ Ր جຊߏจ ୈճ Ր ߏ଄ମɺεϥΠεɺϚοϓ ୈճ Ր ඪ४ϥΠϒϥϦ͸΍Ί͙Γ ୈճ Ր ϞδϡʔϧγεςϜͱ֎෦ϥΠϒϥϦ ୈճ Ր )FSPLV(Pೖ໳ ୈճ Ր "84-BNCEB(Pೖ໳ ୈճ Ր ฒߦॲཧϓϩάϥϛϯά ୈճ Ր ୯ମςετٕ๏ ୈճ Ր σʔλϕʔεΞΫηε ୈճ Ր 'ZOFʹΑΔ(6*ΞϓϦέʔγϣϯ։ൃ ୈճ Ր ࣾ಺(PϓϩδΣΫτͷίʔυղઆ

Slide 5

Slide 5 text

෼ذͱϧʔϓ

Slide 6

Slide 6 text

JGFMTF package mai n import ( "fmt " "runtime " ) func main() { if runtime.GOOS == "windows" { fmt.Println("͋ͳͨͷ PC ͸ Windows Ͱ͢" ) } else if runtime.GOOS == "darwin" { fmt.Println("͋ͳͨͷ PC ͸ macOS Ͱ͢" ) } else { fmt.Println("͋ͳͨͷ PC ͸ Windows Ͱ΋ macOS Ͱ΋͋Γ·ͤΜ" ) } } ຊจ͕1ߦͰ΋ඞͣ೾ׅހͰ͘͘Δඞཁ͕͋Δ
 ৚݅ࣜ͸ؙׅހͰ͘͘Δඞཁͳ͠

Slide 7

Slide 7 text

TXJUDI package mai n import ( "fmt " "runtime " ) func main() { switch runtime.GOOS { case "windows" : fallthroug h case "darwin" : fmt.Println("͋ͳͨͷ PC ͸ Windows ·ͨ͸ macOS Ͱ͢" ) default : fmt.Println("͋ͳͨͷ PC ͸ Windows Ͱ΋ macOS Ͱ΋͋Γ·ͤΜ" ) } } fallthrough Ͱ໌ࣔతʹॻ͔ͳ͍ݶΓ͸Լʹ͸ྲྀΕͳ͍
 ($΍+BWBͷΑ͏ͳ break ࿙Εͷ৺഑͕͍Βͳ͍)

Slide 8

Slide 8 text

TXJUDI package mai n import ( "fmt " "time " ) func main() { t := time.Now( ) switch { case t.Hour() < 12 : fmt.Println("͓͸Α͏͍͟͝·͢" ) case t.Hour() < 17 : fmt.Println("͜Μʹͪ͸" ) default : fmt.Println("͜Μ͹Μ͸" ) } } case ಺ʹ৚݅ࣜΛॻ͘͜ͱ΋Ͱ͖Δ

Slide 9

Slide 9 text

GPS package mai n import "fmt" func main() { for i := 0; i < 3; i++ { fmt.Println(i ) } for i, v := range []int{1, 2, 3} { fmt.Println(i, v) // ΠϯσοΫε൪߸ ஋ } for k, v := range map[int]string{1: "͋", 2: "͍", 3: "͏"} { fmt.Println(k, v) // Ωʔ ஋ } } ੲͳ͕ΒͷΠςϨʔλʔͷΠϯΫϦϝϯτͷ΄͔ɺ
 range Λ࢖ͬͨ foreach తͳίʔυ΋هड़Ͱ͖Δ

Slide 10

Slide 10 text

GPS package mai n func main() { var sum = 1 for sum < 1000 { sum += su m } var count = 0 for { count+ + if count < 1000 { brea k } } } 👉 👉 for Ͱ while తͳ͜ͱ΋ॻ͘
 ແݶϧʔϓ͸୯७ʹ for {…}

Slide 11

Slide 11 text

جຊσʔλܕ

Slide 12

Slide 12 text

جຊσʔλܕ छྨ جຊσʔλܕ ஋ͷྫ ਅِ஋ bool true false ੔਺ int int8 int16 int32 int64 -3 0 100 1_234 ූ߸ͳ͠੔਺ uint uint8 uint16 uint32 uint64 uintptr 0 100 1_234 ුಈখ਺఺਺ float32 float64 3.14 1. .9 1e-2 ෳૉ਺ complex64 complex128 1+2i 3+4i όΠτ byte 0x7a 0xBadFace จࣈ rune string 'a' "ੈք" `\n`

Slide 13

Slide 13 text

จࣈྻ w TUSJOHͰఆٛͨ͠จࣈྻ͸όΠτྻͰදݱ͞Ε͍ͯΔ w 6OJDPEFจࣈͭͭ͸SVOFͱͯ͠ѻ͏͜ͱ͕Ͱ͖ Δ͕ɺSVOFͱͯ͠ѻ͏͜ͱΛ໌ࣔ͢Δඞཁ͕͋Δ ʜ ) F M M P & # & $ ʜ EBUB MFO )FMMP ੈքz ੈ ք var s = "Hello, ੈք " fmt.Println(len(s)) // όΠτ਺ = 1 3 fmt.Println(len([]rune(s))) // rune ਺ = 9

Slide 14

Slide 14 text

ԋࢉࢠ छྨ ԋࢉࢠ ࢉज़ + - * / % Ϗοτ & | ^ &^ << >> ൺֱ == != < <= > >= ࿦ཧ && || ! ΞυϨε & * νϟωϧ <- ୅ೖ += -= *= /= %= ++ -- = := 👈ୈճͰઆ໌ 👆ͷͪ΄Ͳઆ໌

Slide 15

Slide 15 text

1SJOUGϑΥʔϚοτ 7FSCT આ໌ %d 10ਐදهͷ੔਺ %x %o %b 16ਐදهɺ8ਐදهɺ2ਐදه %t true ͋Δ͍͸ false %c ϧʔϯ (Unicode ίʔυϙΠϯτ) %s จࣈྻ %q Ҿ༻ූͰғ·Εͨจࣈྻ͋Δ͍͸ϧʔϯ %v ೚ҙͷܕʹର͢ΔࣗવͳϑΥʔϚοτ %T ೚ҙͷ஋ͷܕ %% ύʔηϯτه߸ͦͷ΋ͷ (Φϖϥϯυͳ͠) 👈ศར fmt.Printf("%d %s %t\n”, 123, "Hello", true)

Slide 16

Slide 16 text

ؔ਺

Slide 17

Slide 17 text

ؔ਺ͷجຊ package mai n import "fmt " // ύϥϝʔλʔ΋݁Ռ΋ͳ͍ؔ਺ func main() { fmt.Println(swap(1, 2)) // ݁Ռ: 2 1 } // 2ͭͷύϥϝʔλʔͱ2ͭͷ݁Ռ͕͋Δؔ਺ func swap(a, b int) (int, int) { return b, a } ໊લɺύϥϝʔλʔͷϦετɺ݁ՌͷϦετͰߏ੒͞ΕΔ
 main ؔ਺ͷΑ͏ʹύϥϝʔλʔ΋݁Ռ΋ͳ͍ؔ਺΋͋Δ

Slide 18

Slide 18 text

໊લ෇͖ͷ݁Ռ package mai n import "fmt " func main() { fmt.Println(add(1, 2) ) } func add(a, b int) (result int) { result = a + b return // ΋ͪΖΜ return result Ͱ΋ྑ͍ } ݁Ռʹ΋໊લΛ෇͚Δ͜ͱ͕Ͱ͖Δ
 ͔͠΋ return ͷޙͷ݁ՌΛলུͰ͖Δ
 ͋Μ·Γྲྀߦ͍ͬͯͳ͍😅 👇

Slide 19

Slide 19 text

Τϥʔॲཧઓུ w Τϥʔॲཧ͸errorܕΛฦ͢͜ͱͰ࣮ݱ͢Δ w errors.new()΍fmt.Errorf()ͳͲΛ༻͍ͯerror஋Λߏங͢Δ w ຊ౰ʹக໋తͳ৔߹͸panic()Λ࢖͏͕ɺΑ΄Ͳͷ͜ͱ͕ແ͍ݶΓ࢖͏͜ ͱ͸ͳ͍ package mai n import "errors " func checkArgs(args []string) (int, error) { if len(args) < 2 { return 2, errors.New("Ҿ਺Λ 1 ͭࢦఆ͍ͯͩ͘͠͞" ) } return 0, ni l }

Slide 20

Slide 20 text

Τϥʔॲཧઓུ w errorΛฦؔ͢਺Λ࢖͏ͱ͖͸ɺͦΕ͕nilͰͳ͍͔ΛifจͰݕࠪ͢Δ ΠσΟΦϜΛ༻͍Δ w errorܕͷม਺໊͸errͱ͢Δ׳ྫ͕͋Δ package mai n import ( "fmt " "os " ) func main() { status, err := checkArgs(os.Args ) if err != nil { fmt.Println("Τϥʔ:", err ) } os.Exit(status ) }

Slide 21

Slide 21 text

Τϥʔॲཧઓུ package mai n import ( "fmt " "os " ) func main() { if _, err := os.Stat("go.mod"); err != nil { fmt.Println("go.mod ͕͋Γ·ͤΜʂ" ) } } error Ҏ֎ͷ݁Ռʹڵຯ͕ͳ͍৔߹͸͜Μͳॻ͖ํ΋ʂ
 (if ͷ৚݅ࣜ಺ʹʮ;ʯͰؔ਺ݺͼग़͠ͷࣜΛ૊ΈࠐΈ)

Slide 22

Slide 22 text

ແ໊ؔ਺ package mai n import ( "fmt " "sort " ) func main() { stations := []string{"וా", "໼ޱ౉", "෢ଂ৽ా", "Լؙࢠ", "ӏͷ໦", "প෦", "ଟຎ઒" } sort.Slice(stations, func(i, j int) bool { return len(stations[i]) > len(stations[j]) // ௕͞Λൺֱ } ) fmt.Println(stations[0]) // ෢ଂ৽ా } w sort.Slice()ͷΑ͏ͳؔ਺Λཁٻ͢Δؔ਺Ͱ͸ɺͦͷ৔Ͱແ໊ؔ਺Λ࡞ͬ ͯ౉͢͜ͱ͕Ͱ͖Δ w ͜ͷؔ਺ͷؔ਺ఆٛ͸ҎԼͷΑ͏ʹͳ͍ͬͯΔ func Slice(x interface{}, less func(i, j int) bool)

Slide 23

Slide 23 text

ՄมݸҾ਺ؔ਺ package mai n import ( "fmt " "sort " ) func main() { fmt.Println(longestName("וా", "໼ޱ౉", "෢ଂ৽ా", "Լؙࢠ", "ӏͷ໦", "প෦", "ଟຎ઒") ) } func longestName(names ...string) string { if len(names) == 0 { return " " } sort.Slice(names, func(i, j int) bool { return len(names[i]) > len(names[j]) } ) return names[0 ] } ύϥϝʔλʔͷܕͷલʹলུه߸ʮ…ʯΛ෇͚ΔͱՄมݸҾ਺ʹͳΔ
 ࠷௿Ͱ΋1ͭͷύϥϝʔλʔΛऔΓ͍ͨ৔߹͸ݻఆͱՄมΛ૊Έ߹Θͤͯ޻෉͢Δ

Slide 24

Slide 24 text

ՄมݸҾ਺ؔ਺ package mai n import ( "fmt " "sort " ) func main() { stations := []string{"וా", "໼ޱ౉", "෢ଂ৽ా", "Լؙࢠ", "ӏͷ໦", "প෦", "ଟຎ઒" } fmt.Println(longestName(stations...) ) } εϥΠε དྷिৄ͘͠঺հ ΛՄมݸҾ਺ʹ౉͍ͨ͠৔߹͸ʮʯͰల։͢Δඞཁ͕͋Δ

Slide 25

Slide 25 text

஗Ԇؔ਺ݺͼग़͠ w deferΛ༻͍Δͱؔ਺ͷऴྃ࣌ʹॲཧΛ࣮ࢪ͢Δ͜ͱ͕Ͱ͖Δ w ϦιʔεͷΫϩʔζॲཧͳͲʹศར package mai n import "fmt " func main() { fmt.Println("main() ͷ࠷ॳ" ) demo( ) fmt.Println("main() ͷ࠷ޙ" ) } func demo() { fmt.Println("=== demo() ͷ࠷ॳ" ) defer fmt.Println("=== defer ͷॲཧ" ) fmt.Println("=== demo() ͷ࠷ޙ" ) } 👉IUUQT QMBZHPMBOHPSHQ GY#@[#7+7 ΍ͬͯΈΑ͏

Slide 26

Slide 26 text

EFGFSͷසग़ྫ package mai n import ( "fmt " "io " "net/http " ) func main() { resp, err := http.Get("https://checkip.amazonaws.com/" ) if err != nil { fmt.Println(err ) retur n } defer resp.Body.Close( ) body, err := io.ReadAll(resp.Body ) if err != nil { fmt.Println(err ) retur n } fmt.Println(string(body) ) } 👈

Slide 27

Slide 27 text

໊લ෇͚

Slide 28

Slide 28 text

(Pͷ໊લϧʔϧ w ઌ಄͸จࣈ·ͨ͸ʮ@ʯ w Ҏ߱͸จࣈɺ਺ࣈɺʮ@ʯ͕ར༻Ͱ͖Δ w 6OJDPEFจࣈ͕࢖͑Δ w େจࣈͱখจࣈ͸۠ผ͞ΕΔ w ઌ಄͕େจࣈͩͱଞͷύοέʔδ͔ΒࢀরͰ͖Δ 
 ˞͋ͱͰৄ͘͠આ໌͠·͢

Slide 29

Slide 29 text

೔ຊޠ΋࢖͑Δ package mai n import "fmt " func main() { var ม਺ strin g ม਺ = "ม਺ͩΑ " fmt.Println(ม਺, όΠτ਺(ม਺), จࣈ਺(ม਺) ) } func όΠτ਺(จࣈྻ string) int { return len(จࣈྻ ) } func จࣈ਺(จࣈྻ string) int { return len([]rune(จࣈྻ) ) } 👉IUUQTQMBZHPMBOHPSHQ9+EBHL-L

Slide 30

Slide 30 text

໊લ෇͚ͷ׳श w ϩʔΧϧม਺΍ؔ਺ͷύϥϝʔλʔ͸୹͘͢Δͷ͕ଟ͍ w ྫi name err req ctx w είʔϓ͕େ͖͍ؔ਺͸ҙຯ͕े෼ʹ఻ΘΔ໊લʹ w ྫhttp.ListenAndServe() runtime.SetMutexProfileFraction() w ୯ޠͷ࿈݁͸Ωϟϝϧέʔεɺͨͩ͠಄ࣈޠ΍಄จࣈޠ͸ৗʹಉ ͡έʔε શͯେจࣈ͔શͯখจࣈ w ྫtemplate.HTMLEscape() http.ParseHTTPVersion()

Slide 31

Slide 31 text

༧໿ޠ ,FZXPSET break default func interface select case defer go map struct chan else goto package switch const fallthrough if range type continue for import return var ༧໿ޠͱ͸ɺߏจతʹڐ͞Ε͍ͯΔ৔ॴͰ͚ͩ࢖͑Δ༻ޠͷ͜ͱ 
 ͜ΕΒͷ༧໿ޠ͸ม਺໊΍ؔ਺໊ʹ࢖͏͜ͱ͸Ͱ͖ͳ͍

Slide 32

Slide 32 text

ࣄલએݴ 1SFEFDMBSFE ఆ਺ true false iota nil ܕ int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr float32 float64 complex128 complex64 bool byte rune string error ؔ਺ make len cap new append copy close delete complex real imag panic recover ݴޠ࢓্༷͸༧໿ޠͰ͸ͳ͍͕ɺ 
 ฆΒΘ͍͠ͷͰม਺໊΍ؔ਺໊ͳͲʹ༻͍Δͷ͸ආ͚Α͏

Slide 33

Slide 33 text

ม਺

Slide 34

Slide 34 text

ม਺ͷએݴͱར༻ package mai n import "fmt " func main() { var s string // จࣈྻͷม਺એݴ var i int // ੔਺ͷએݴ fmt.Println(s, i) // ۭ "" ͱ 0 ͕ग़ྗ͞ΕΔ s, i = "foo", 3 // ͦΕͧΕͷม਺ʹ஋Λ୅ೖ (1ߦʹ·ͱΊͯΈͨ ) fmt.Println(s, i) // ஋ "foo" ͱ 3 ͕ग़ྗ͞ΕΔ } ༧໿ޠvarͱܕ໊Λࢦఆͯ͠ม਺ΛએݴͰ͖Δ 
 ఆٛͨ͠ม਺͸ͦͷϒϩοΫͷத ্ͷྫͩͱmainؔ਺಺ ͰͷΈར༻Ͱ͖Δ

Slide 35

Slide 35 text

ม਺ͷએݴͱར༻ package mai n import "fmt " func main() { var s string = "foo" // จࣈྻม਺ s Λఆٛ͠ɺ "foo" Λ୅ೖ var i int = 3 // ੔਺ม਺ i Λఆٛ͠ɺ 3 Λ୅ೖ fmt.Println(s, i) // ஋ “foo" ͱ 3 ͕ग़ྗ͞ΕΔ } ఆٛͱ୅ೖΛಉ࣌ʹߦ͏͜ͱ΋Ͱ͖Δ

Slide 36

Slide 36 text

ม਺ͷએݴͱར༻ package mai n import "fmt " func main() { var s = "foo" // จࣈྻม਺ s Λఆٛ͠ɺ "foo" Λ୅ೖ (ܕΛলུ ) var i = 3 // ੔਺ม਺ i Λఆٛ͠ɺ 3 Λ୅ೖ (ܕΛলུ ) fmt.Println(s, i) // ஋ "foo" ͱ 3 ͕ग़ྗ͞ΕΔ } ॳظ஋͕͋Ε͹ܕΛলུͰ͖Δ ܕਪ࿦

Slide 37

Slide 37 text

ม਺ͷએݴͱར༻ package mai n import "fmt " func main() { var ( s = "foo" // จࣈྻม਺ s Λఆٛ͠ɺ "foo" Λ୅ೖ (ܕΛলུ ) i = 3 // ੔਺ม਺ i Λఆٛ͠ɺ 3 Λ୅ೖ (ܕΛলུ ) ) fmt.Println(s, i) // ஋ ("foo") ͱ 3 ͕ग़ྗ͞ΕΔ } ෳ਺ͷvarΛ·ͱΊΔ͜ͱ΋Ͱ͖Δ

Slide 38

Slide 38 text

ม਺ͷએݴͱར༻ package mai n import "fmt " func main() { s := "foo" // จࣈྻͷলུม਺એݴ i := 3 // ੔਺ͷলུએݴ fmt.Println(s, i) // ஋"foo" ͱ 3 ͕ग़ྗ͞ΕΔ } লུม਺એݴʮ:=ʯΛ࢖͑͹varΛॻ͔ͳͯ͘΋Α͍

Slide 39

Slide 39 text

ఆ਺

Slide 40

Slide 40 text

ఆ਺ͷએݴͱར༻ package mai n import "fmt " func main() { const s = "foo" // ஋ "foo" Λ࣋ͭఆ਺ s Λఆٛ const i = 3 // ஋ 3 Λ࣋ͭఆ਺ i Λఆٛ fmt.Println(s, i) // ஋ "foo" ͱ 3 ͕ग़ྗ͞ΕΔ } ίϯύΠϧ࣌ʹ஋͕֬ఆ͍ͯ͠Δ৔߹ʹ༧໿ޠconstͰఆ਺ΛએݴͰ͖Δ 
 ਅِ஋ɺจࣈྻɺ਺஋ͷΈ࢖͑Δ ߏ଄ମ΍Ϛοϓ౳ʹ͸࢖͑ͳ͍

Slide 41

Slide 41 text

ఆ਺ͷએݴͱར༻ package mai n import "fmt " func main() { const ( a = 1 b c = 2 d ) fmt.Println(a, b, c, d) // ݁Ռ: 1 1 2 2 } ෳ਺ͷDPOTU͸·ͱΊΔ͜ͱ͕Ͱ͖ɺͦͷ৔߹͸ͭ໨Ҏ߱ͷ஋ͷলུ΋Ͱ͖Δ

Slide 42

Slide 42 text

ఆ਺ͷએݴͱར༻ package mai n import "fmt " func main() { const ( a = iot a b c d ) fmt.Println(a, b, c, d) // ݁Ռ: 0 1 2 3 } iota ΠΦλ Λ࢖͏ͱ͔Β࢝·Γͣͭ૿Ճ͢Δఆ਺Λ؆୯ʹఆٛͰ͖Δ 
 (Pʹ͸ଞͷݴޠʹΑ͋͘Δྻڍମ enum ͕ͳ͍ͷͰɺ͜ΕͰ୅༻͢Δ͜ͱ͕ଟ͍

Slide 43

Slide 43 text

ఆ਺ͷએݴͱར༻ package mai n import "fmt " func main() { const ( _ = 1 << (10 * iota ) KiB // 1024 B MiB // 1048576 B (1024 KiB ) GiB // 1073741824 B (1024 MiB ) TiB // 1099511627776 (1024 GiB ) PiB // 1125899906842624 (1024 TiB ) EiB // 1152921504606846976 (1024 PiB ) ZiB // 1180591620717411303424 (1024 EiB ) YiB // 1208925819614629174706176 (1024 YiB ) ) fmt.Println(KiB, MiB, GiB, TiB, PiB, EiB ) fmt.Println(ZiB/1024, YiB/1024/1024 ) } iota͸ܭࢉࣜʹ૊ΈࠐΜͰར༻͢Δ͜ͱ΋Ͱ͖Δ

Slide 44

Slide 44 text

ఆ਺ͷએݴͱར༻ package mai n import "fmt " func main() { const n = 127 // ͜͜Λ 128 ʹ͢Δͱ࣍ͷߦ͸ίϯύΠϧΤϥʔ var i8 int8 = n // -128ʙ12 7 var i16 int16 = n // -32768ʙ3276 7 var i32 int32 = n // -2147483648ʙ214748364 7 var i64 int64 = n // -9223372036854775808ʙ922337203685477580 7 var ui8 uint8 = n // 0ʙ25 5 var ui16 uint16 = n // 0ʙ6553 5 var ui32 uint32 = n // 0ʙ429496729 5 var ui64 uint64 = n // 0ʙ1844674407370955161 5 fmt.Println(i8, i16, i32, i64, ui8, ui16, ui32, ui64 ) } ఆ਺͸ͦͷ஋͕දݱՄೳͳܕͰ͋Ε͹༷ʑͳܕʹ୅ೖͰ͖Δ

Slide 45

Slide 45 text

ύοέʔδ

Slide 46

Slide 46 text

NBJOύοέʔδ package mai n import … package mai n import … package mai n import … mainύοέʔδ͸main()ؔ਺Λஔ͘͜ͱͰϓϩάϥϜͷ 
 ΤϯτϦʔϙΠϯτͱͳΔ͜ͱ͕Ͱ͖Δಛผͳύοέʔδ 
 ҟͳΔϓϩάϥϜͳΒσΟϨΫτϦ΋෼͚Δඞཁ͕͋Δ

Slide 47

Slide 47 text

ύοέʔδͷ഑ஔ EC UPPM NBJOHP VTFSHP QBDLBHFNBJO QBDLBHFEC GBSNHP QBDLBHFEC w σΟϨΫτϦ໊ͱύοέʔδ໊͸ඞͣ͠΋Ұக͍ͯ͠ͳͯ͘΋Α͍ w ΋ͪΖΜҰக͍ͯͨ͠΄͏͕Θ͔Γ΍͍͢ w NBJOύοέʔδͷσΟϨΫτϦ໊͸go buildίϚϯυͰ࣮ߦϑΝΠϧΛ࡞Δࡍ ʹ࣮ߦϑΝΠϧ໊ʹͳΔ ্ͷྫͩͱtool.exe͕Ͱ͖Δ

Slide 48

Slide 48 text

ύοέʔδͷϧʔϧɾ׳ྫ w ઌ಄͕େจࣈͷؔ਺ɺม਺ɺఆ਺ɺܕͳͲ͕֎෦ ύοέʔδ͔ΒΞΫηεͰ͖Δ w ಉ͡ύοέʔδ಺Ͱ͋Ε͹ɺτοϓϨϕϧͰఆٛ͠ ͨ΋ͷ͸ผϑΝΠϧ͔Β΋ΞΫηεͰ͖Δ w ύοέʔδ໊͸খจࣈͰॻ͖ɺه߸͸ෆՄɺͳΔ΂ ͘୹໊͍લ͕;͞Θ͍͠ w ඪ४ϥΠϒϥϦͷྫos io strconv utf8

Slide 49

Slide 49 text

࡞ͬͯΈΑ͏ w UFNQDPOWHPͱDPOWHPʹڭՊॻ1ͷίʔυΛࣸܦ͍ͯͩ͘͠͞ w NBJOHPͷNBJOؔ਺ͷத਎͸͜͏͠·͠ΐ͏ ϗʔϜσΟϨΫτϦHPTSDHJUIVCDPNVNPUJPOHPUSBJOJOHϢʔβʔ໊ҎԼ EBZUFNQDPOW EBZDPOWUPPM NBJOHP UFNQDPOWHP DPOWHP fmt.Println(tempconv.CToF(24.5))

Slide 50

Slide 50 text

࣮ߦํ๏ 74$PEFͰmainύοέʔδͷϑΝΠϧ΍ σΟϨΫτϦΛӈΫϦοΫ͠ʮ౷߹λʔϛφϧ Ͱ։͘ʯΛબ୒ ʮgo run .ʯ&OUFSͱೖྗ

Slide 51

Slide 51 text

ʙղઆλΠϜʙ

Slide 52

Slide 52 text

͕࣌ؒ༨ͬͨΒʜ w ࿅श໰୊ 1 w ͖͞΄ͲͷEBZUFNQDPOWͱEBZDPOWUPPMʹίʔυΛॻ ͖଍͍ͯͩ͘͠͞ w ࿅श໰୊ 1 w EBZXFJHIUDPOWͱEBZMFOHUIDPOWΛ࡞ΓɺEBZ DPOWUPPMͷίʔυΛվྑ͍ͯͩ͘͠͞ w ࿅श໰୊ʙ 1 w ϑΥϧμ໊͸EBZDIFYʙEBZDIFYͱ͍ͯͩ͘͠͞

Slide 53

Slide 53 text

ίʔυΛॻ͖ऴ͑ͨΒ w ʮϢʔβʔ໊QSBDUJDFʯϒϥϯνͰ࡞ۀ͍ͯ͠Δ͜ͱΛ֬ೝ͍ͯͩ͘͠͞ w 74ίʔυͷҰ൪ࠨԼʹදࣔ͞Ε͍ͯ·͢ w มߋΛεςʔδ͠ɺίϛοτ͍ͯͩ͘͠͞ w 74ίʔυͷࠨϝχϡʔͷʮιʔε؅ཧʯ͔Βૢ࡞ w ίʔυΛ(JU)VCʹϓογϡ͍ͯͩ͘͠͞ w 74ίʔυͷҰ൪ࠨԼͷϒϥϯν໊ͷ͙͢ӈʹ͋ΔΞΠίϯ͔Βૢ࡞ ্ਤ w ϓϧϦΫΤετΛ࡞੒͍ͯͩ͘͠͞ w ʮιʔε؅ཧʯͷ্෦ʹΞΠίϯ͕͋Γ·͢

Slide 54

Slide 54 text

࣍ճ༧ࠂ w ࣍ճ͸ʮߏ଄ମɺεϥΠεɺϚοϓʯͰ͢ w ෼͔Βͳ͔ͬͨͱ͜Ζ΍࣭໰ͳͲ͸ɺࣾ಺ 4MBDLHPQIFSTνϟϯωϧʹ౤ߘ͍ͩ͘͞ w ຊ೔ͷ಺༰ΛΑΓਂ͘ཧղ͍ͨ͠ํ͸ɺڭՊॻ ͷୈষɺୈষɺୈষɺୈষΛಡΜͰΈͯ͘ ͍ͩ͞