03-variable-types

command
v0.0.0-...-e665a74 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 2 Imported by: 0

README

Variables and Types

  1. Open directory
cd /root/automation-technology/chapter01-basic-knowledges/1.1-basic-golang/03-variable-types
  1. Run command
go mod init automationworkshop/main
go mod tidy
  1. Run command
go run main.go
string =  This variable type string
int =  305
bool =  true
---
interface =  This variable type string
interface =  305
interface =  true
---
map =  map[citizen_id:1234 firstname:Chaiyapong lastname:Lapliengtrakul]
map JSON =  {"citizen_id":"1234","firstname":"Chaiyapong","lastname":"Lapliengtrakul"}
No Gender specify
---
slice =  [item 1 item 2 item 3]
slice JSON =  ["item 1","item 2","item 3"]
---
Citizen =  &{Chaiyapong Lapliengtrakul 1234}
Citizen JSON =  {"firstname":"Chaiyapong","lastname":"Lapliengtrakul","citizen_id":"1234"}
---
theMap is nil
theCitizen is nil
---
Gender is Unspecify
Gender =  UNSPECIFY
---

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL