YousefZinsazK78 / testgolangprojectfirst

example first golang project....

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

first example golang project....

  1. we talk about assign variable in pkg/ex_variable/ex_variable.go
  2. we talk about assign variable in pkg/ex_control_flow/ex_control_flow.go
  3. we talk about function in pkg/ex_function/ex_function.go
  4. we talk about data types like map,slice,array in pkg/ex_data_types/ex_datatypes.go
  5. we talk about data pointer type in pkg/ex_pointer/ex_pointer.go
  6. we talk about struct in pkg/ex_struct/ex_struct.go
  7. we talk about interfaces in pkg/ex_interface/ex_interface.go
  8. we talk about interfaces in pkg/ex_interface/ex_interface.go

we talk about and write makefiles in our project to automate tasks...

we talk about go module we can name our module with this command go mod init github.com/yourgithubusername/yourprojectname and valla you set your module name and now you have go.mod that is have your module information like what is your module name or path and your go version in this project and after that we have our dependencies that is direct or indirect uses in project.

after that we talk about go get module_name@latest this is command help us to download and put it in go.mod file and we can imported in our modules files and use it....

we can use go get package_name to get package use go get -u package_name to get latest update use got get package_name@v0.2.0 to get version v0.2.0 of package_name that's it for now, thanks. 😁😁

About

example first golang project....


Languages

Language:Go 97.8%Language:Makefile 2.2%