Coder Social home page Coder Social logo

learn-go's Introduction

Learn_Go

A Tour Of Go Exercise を実施した記録です。

Exercise をフォルダごとに格納しています。

Exercise: Loops and Functions

Link

Exercise: Loops and Functions

Usage

cd learn_Go/ex_loop_and_functions/

引数なしのデフォルトは 2 としている.

go run loop_and_functions.go -num=3

OutPut

0回目:2
1回目:1.75
2回目:1.7321428571428572
3回目:1.7320508100147276
4回目:1.7320508075688772
own sqrt: 1.7320508075688772
math pkg sqrt: 1.7320508075688772

Exercise: Slices

Link

Exercise: Slices

Usage

go get golang.org/x/tour
cd learn_Go/ex_slices
go run slices.go

OutPut

Exercise: Maps

Link

Exercise: Maps

Usage

cd learn_Go/ex_maps/
go run maps.go

OutPut

PASS
 f("I am learning Go!") =
  map[string]int{"Go!":1, "I":1, "am":1, "learning":1}
PASS
 f("The quick brown fox jumped over the lazy dog.") =
  map[string]int{"The":1, "brown":1, "dog.":1, "fox":1, "jumped":1, "lazy":1, "over":1, "quick":1, "the":1}
PASS
 f("I ate a donut. Then I ate another donut.") =
  map[string]int{"I":2, "Then":1, "a":1, "another":1, "ate":2, "donut.":2}
PASS
 f("A man a plan a canal panama.") =
  map[string]int{"A":1, "a":2, "canal":1, "man":1, "panama.":1, "plan":1}

Exercise: Fibonacci closure

Link

Exercise: Fibonacci closure

Usage

cd learn_Go/ex_fibonacci_closure/
go run fibonacci_closure.go

OutPut

1
1
2
3
5
8
13
21
34
55

Exercise: Stringers

Link

Exercise: Stringers

Usage

cd learn_Go/ex_stringers/
go run stringers.go

OutPut

loopback: 127.0.0.1
googleDNS: 8.8.8.8

Exercise: Errors

Link

Exercise: Errors

Usage

cd learn_Go/ex_errors/

引数なしのデフォルトは 2 としている.

go run errors.go -num=3

OutPut

0回目:2
1回目:1.75
2回目:1.7321428571428572
3回目:1.7320508100147276
4回目:1.7320508075688772
1.7320508075688772 <nil>
----
-3 cannot Sqrt negative number: -3

Exercise: Readers

Link

Exercise: Readers

Usage

cd learn_Go/ex_reader/
go run reader.go

OutPut

OK!

Exercise: rot13Reader

Link

Exercise: rot13Reader

Usage

cd learn_Go/ex_rot13Reader/
go run rot13Reader.go

OutPut

looking forward to it.

Exercise: Images

Link

Exercise: Images

Usage

cd learn_Go/ex_images/
go run images.go

OutPut

learn-go's People

Contributors

akagikouzanh avatar

Watchers

 avatar

learn-go's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.