GithubHelp home page GithubHelp logo

sample-go's Introduction

Go Language - Learn

Basic Knowledge

Variable

key for saving value. to define a variable in go lang we can using few different ways :

  • var variable type = value
  • var lastName string = "Fadjri"
  • variableName := 40

Data Type Declarations

This document provides declarations of various data types and their respective value ranges in the Go programming language.

  • int8Var is a declaration of the int8 data type with a minimum value of -128 and a maximum value of 127.

  • int16Var is a declaration of the int16 data type with a minimum value of -32768 and a maximum value of 32767.

  • int32Var is a declaration of the int32 data type with a minimum value of -2147483648 and a maximum value of 2147483647.

  • int64Var is a declaration of the int64 data type with a minimum value of -9223372036854775808 and a maximum value of 9223372036854775807.

  • uintVar is a declaration of the uint data type with a minimum value of 0 and a maximum value of 255 (depending on the platform's architecture).

  • float32Var is a declaration of the float32 data type.

  • float64Var is a declaration of the float64 data type.

These declarations are provided to understand the data types and their respective value ranges in the Go programming language.

Type Declaration

type declaration is like we create an "Alias" for variable we wanted it.

  • type isMarried bool

    var marriedStatus isMarried = false

we create an Alias isMarried with data type boolean.

sample-go's People

Contributors

faidfadjri avatar

Watchers

 avatar

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.