Skip to main content

Command Palette

Search for a command to run...

Structs

Updated
1 min readView as Markdown
Structs
S
DevRel at StackGen | Formerly at Deepfence ,Tenable , Accurics | AWS Community Builder also Docker Community Award Winner at Dockercon2020 | CyberSecurity Innovator of Year 2023 award by Bsides Bangalore | Docker/HashiCorp Meetup Organiser Bangalore & Co-Author of Learn Lightweight Kubernetes with k3s (2019) , Packt Publication & also run Non Profit CloudNativeFolks / CloudSecCorner Community To Empower Free Education reach out me twitterhttps://twitter.com/sangamtwts or just follow on GitHub -> https://github.com/sangam14 for Valuable Resources

A struct is a collection of fields.

we are creating xy struct with X and Y fiels.

type xy struct {
    X string
    Y string
}

Go Program

package main

import "fmt"

type xy struct {
    X string
    Y string
}

func main() {
    fmt.Println(xy{"x", "y"})
}
12 views

More from this blog

C

CloudNativeFolks Community

140 posts

CloudNativeFolks is non profit community that empower and educate about cloud native technology !