🎯Docker & Google Kubernetes Engine (GKE)🎯
👇Manage containerized applications on Kubernetes👇
🔺gcloud auth configure-docker
: Register the gcloud tool as a Docker credential helper.
🔺gcloud container clusters create:
Create a cluster to run GKE containers.
🔺gcloud container clusters list:
List clusters for running GKE containers.
🔺gcloud container clusters get-credentials:
Update kubeconfig to get kubectl to use a GKE cluster.
🔺gcloud container images list-tags:
List tag and digest metadata for a container image.
🔰 @gopher_academy
👇Manage containerized applications on Kubernetes👇
🔺gcloud auth configure-docker
: Register the gcloud tool as a Docker credential helper.
🔺gcloud container clusters create:
Create a cluster to run GKE containers.
🔺gcloud container clusters list:
List clusters for running GKE containers.
🔺gcloud container clusters get-credentials:
Update kubeconfig to get kubectl to use a GKE cluster.
🔺gcloud container images list-tags:
List tag and digest metadata for a container image.
🔰 @gopher_academy
🎯Virtual Machines & Compute Engine🎯
👇Create, run, and manage VMs on Google infrastructure👇
🔺gcloud compute zones list:
List Compute Engine zones.
🔺gcloud compute instances describe:
Display a VM instance's details.
🔺gcloud compute instances list:
List all VM instances in a project.
🔺gcloud compute disks snapshot:
Create snapshot of persistent disks.
🔺gcloud compute snapshots describe:
Display a snapshot's details.
🔺gcloud compute snapshots delete:
Delete a snapshot.
🔺gcloud compute ssh:
Connect to a VM instance by using SSH.
🔰 @gopher_academy
👇Create, run, and manage VMs on Google infrastructure👇
🔺gcloud compute zones list:
List Compute Engine zones.
🔺gcloud compute instances describe:
Display a VM instance's details.
🔺gcloud compute instances list:
List all VM instances in a project.
🔺gcloud compute disks snapshot:
Create snapshot of persistent disks.
🔺gcloud compute snapshots describe:
Display a snapshot's details.
🔺gcloud compute snapshots delete:
Delete a snapshot.
🔺gcloud compute ssh:
Connect to a VM instance by using SSH.
🔰 @gopher_academy
🎯Serverless & App Engine🎯
👇Build highly scalable applications on a fully managed serverless platform👇
🔺gcloud app deploy:
Deploy your app's code and configuration to the App Engine server.
🔺gcloud app versions list:
List all versions of all services deployed to the App Engine server.
🔺gcloud app browse:
Open the current app in a web browser.
🔺gcloud app create:
Create an App Engine app within your current project.
🔺gcloud app logs read:
Display the latest App Engine app logs.
🔰 @gopher_academy
👇Build highly scalable applications on a fully managed serverless platform👇
🔺gcloud app deploy:
Deploy your app's code and configuration to the App Engine server.
🔺gcloud app versions list:
List all versions of all services deployed to the App Engine server.
🔺gcloud app browse:
Open the current app in a web browser.
🔺gcloud app create:
Create an App Engine app within your current project.
🔺gcloud app logs read:
Display the latest App Engine app logs.
🔰 @gopher_academy
🎯Miscellaneous🎯
👇Commands that might come in handy👇
🔺gcloud kms decrypt:
Decrypt ciphertext (to a plaintext file) using a Cloud Key Management Service (Cloud KMS) key.
🔺gcloud logging logs list:
List your project's logs.
🔺gcloud sql backups describe:
Display info about a Cloud SQL instance backup.
🔺gcloud sql export sql:
Export data from a Cloud SQL instance to a SQL file.
🔰 @gopher_academy
👇Commands that might come in handy👇
🔺gcloud kms decrypt:
Decrypt ciphertext (to a plaintext file) using a Cloud Key Management Service (Cloud KMS) key.
🔺gcloud logging logs list:
List your project's logs.
🔺gcloud sql backups describe:
Display info about a Cloud SQL instance backup.
🔺gcloud sql export sql:
Export data from a Cloud SQL instance to a SQL file.
🔰 @gopher_academy
func main() {
i := -5
j := +5 fmt.Printf("%+d %+d", i, j) }
i := -5
j := +5 fmt.Printf("%+d %+d", i, j) }
Anonymous Quiz
63%
-5 +5
22%
+5 +5
6%
-5 -5
9%
+5 -5
🎯ویژگی های که تو ورژن 1.15.x تغیر کرد🎯
Update-remove-fix bug
👇👇👇👇
🔺go1.15.1
🔹(released 2020/09/01)
includes security fixes to the net/http/cgi
net/http/fcgi
🔺go1.15.2
🔹(released 2020/09/09) includes fixes to the compiler, runtime
documentation
the go command
and the net/mail
os
sync
and testing packages
🔺go1.15.3
🔹 (released 2020/10/14)
includes fixes to cgo,
the compiler,
runtime,
the go command,
and the bytes,
plugin,
and testing packages.
🔺go1.15.4
🔹 (released 2020/11/05)
includes fixes to cgo,
the compiler,
linker,
runtime,
and the compress/flate,
net/http,
reflect,
and time packages.
🔰 @gopher_academy
Update-remove-fix bug
👇👇👇👇
🔺go1.15.1
🔹(released 2020/09/01)
includes security fixes to the net/http/cgi
net/http/fcgi
🔺go1.15.2
🔹(released 2020/09/09) includes fixes to the compiler, runtime
documentation
the go command
and the net/mail
os
sync
and testing packages
🔺go1.15.3
🔹 (released 2020/10/14)
includes fixes to cgo,
the compiler,
runtime,
the go command,
and the bytes,
plugin,
and testing packages.
🔺go1.15.4
🔹 (released 2020/11/05)
includes fixes to cgo,
the compiler,
linker,
runtime,
and the compress/flate,
net/http,
reflect,
and time packages.
🔰 @gopher_academy
🔸استخدام برنامهنویس ارشد Golang در شرکت یکتا ایده نوین #تهران
🔹حقوق تا ۸ میلیون تومان
🔗 https://quera.ir/r/qTrKlv
🔰 @gopher_academy
🔹حقوق تا ۸ میلیون تومان
🔗 https://quera.ir/r/qTrKlv
🔰 @gopher_academy
🔺1. تابعی که یکی از پارامترهای خود را تغییر میدهد
🔹وقتی تابعی را فراخوانی میکنیم که یک پوینتر را به عنوان پارامتر میگیرد، انتظار داریم که متغیر ما تغییر داده شود. اگر شما متغیر را در تابع خود تغییر نمیدهید، پس احتمالا نباید از پوینتر استفاده کنید.
🔻2. عملکرد بهتر
🔹اگر رشتهای داشته باشید که شامل یک رمان کامل در حافظه باشد، کپی کردن این متغیر هر بار که به یک تابع جدید ارسال میشود، کاری بسیار گران است. ممکن است ارزشمند باشد که به جای این کار یک پوینتر را ارسال کنید، که باعث صرفهجویی در پردازنده و حافظه میشود. با این حال انجام این کار به قمیت خوانا بودن است، بنابراین فقط در صورت لزوم این بهینهسازی را انجام دهید.
🔻3. به گزینه Nil نیاز دارید
🔹گاهی اوقات یک تابع باید بداند که مقدار یک چیزی چیست، همچنین باید وجود یا عدم وجود آن را بداند. معمولا هنگام خواندن JSON از این استفاده میکنیم تا بدانیم فیلدی وجود دارد یا خیر.
🔰 @gopher_academy
🔹وقتی تابعی را فراخوانی میکنیم که یک پوینتر را به عنوان پارامتر میگیرد، انتظار داریم که متغیر ما تغییر داده شود. اگر شما متغیر را در تابع خود تغییر نمیدهید، پس احتمالا نباید از پوینتر استفاده کنید.
🔻2. عملکرد بهتر
🔹اگر رشتهای داشته باشید که شامل یک رمان کامل در حافظه باشد، کپی کردن این متغیر هر بار که به یک تابع جدید ارسال میشود، کاری بسیار گران است. ممکن است ارزشمند باشد که به جای این کار یک پوینتر را ارسال کنید، که باعث صرفهجویی در پردازنده و حافظه میشود. با این حال انجام این کار به قمیت خوانا بودن است، بنابراین فقط در صورت لزوم این بهینهسازی را انجام دهید.
🔻3. به گزینه Nil نیاز دارید
🔹گاهی اوقات یک تابع باید بداند که مقدار یک چیزی چیست، همچنین باید وجود یا عدم وجود آن را بداند. معمولا هنگام خواندن JSON از این استفاده میکنیم تا بدانیم فیلدی وجود دارد یا خیر.
🔰 @gopher_academy
Forwarded from Gopher Academy
🔺نقشه یادگیری زبان برنامه نویسی گولنگ🔺
🔹️roadmap part 1
https://t.me/gopher_academy/7
🔹️roadmap part 2
https://t.me/gopher_academy/9
🔹️roadmap part 3
https://t.me/gopher_academy/11
✋ @gopher_academy
🔹️roadmap part 1
https://t.me/gopher_academy/7
🔹️roadmap part 2
https://t.me/gopher_academy/9
🔹️roadmap part 3
https://t.me/gopher_academy/11
✋ @gopher_academy
#نکته
🎯زمانی که توی کدهاتون defer دارید از log.fatal استفاده نکنید حتی os.exit چون باعث میشه اون defer اجرا نشه. اما اگر painc باشه بجای log.fatal مشکلی نیست🎯
.
🔰 @gopher_academy
🎯زمانی که توی کدهاتون defer دارید از log.fatal استفاده نکنید حتی os.exit چون باعث میشه اون defer اجرا نشه. اما اگر painc باشه بجای log.fatal مشکلی نیست🎯
.
🔰 @gopher_academy