-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path05_next_steps.slide
63 lines (45 loc) · 2.03 KB
/
05_next_steps.slide
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Further steps with go in your organization
Maximilian Wurzer
Advisory IT Architect, IBM Deutschland
## Pros/Cons of Go
Pros:
- Fast builds
- Performance
- Comprehensibility: easy & quick to develop, focus on readability
- Linguistic stability: The "Go 1 promise"
- Memory safety
- Static linking
- great standard library and huge ecosystem of open source libraries
Cons:
- sometimes too simple & reduced: Slice operations
- missing generics lead to multiple implementations of the same algorithm
## Recommended open source libraries
- [github.com/gorilla/mux](https://github.com/gorilla/mux): HTTP-request multiplexer, compatible with standard HTTP-Server
- [Gorilla Toolkit](https://www.gorillatoolkit.org/): many useful tools around HTTP-Server
- [github.com/google/uuid](https://github.com/google/uuid): UUID data structure
- [github.com/spf13/cobra](https://github.com/spf13/cobra): CLI library (Docker & K8s is using it)
- [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus): Often used logging library
- [gocloud.dev](https://gocloud.dev): *cloud development kit* for cross-*cloud platform* interaction (→ multi- & hybrid-cloud)
## Typical use cases
- Microservices
- CLI-Applications
- cross-compiling
- example: Docker, Kubernetes CLI
- Container eco-system (Docker, Kubernetes)
## IDEs and Go
## Hello World API as container
The example code can be found here:
.link https://github.com/wumaxd/golang-presentation/tree/main/exercises/helloWorldAPI
- Go compiles to native executables of the target architecture
- Allows us to use Alpine Linux (or UBI)
- Results in really small images with fast start-up time
```
REPOSITORY TAG IMAGE ID CREATED SIZE
api ubi8 0c67dd9cc33e 23 seconds ago 108MB
api alpine 4e83eccdbbb3 10 minutes ago 10.5MB
```
## Next steps
- Hack away
- Where to find this presentation?
[https://wumaxd.github.io/golang-presentation/](https://wumaxd.github.io/golang-presentation/)
.image images/github_page.png _ 300