Gopher Academy
✅نحوه استفاده از JSON با Go✅ ❌در ادامه آموزش خواهیم داد 🔴Default types 🟡 https://t.me/gopher_academy/743 🔴Encode (marshal) struct to JSON 🟡 https://t.me/gopher_academy/744 🔴Pretty print 🟡 https://t.me/gopher_academy/745 🔴Decode (unmarshal) JSON to struct…
🔴 Encode (marshal) struct to JSON
🔵 خوب این کد یه نمونه ساده از decode کردن json هست نمونه کد فوق خیلی واضح هست
🔵ما اومدیم یه استراکچر تغریف کردیم
🔵توی خط ۹ تا ۱۵ اومدیم بهش مقدار دادیم
🔵اگه دقت کنید توی خط ۴ ما اومدیم یه تگ بهش ادیم این تگ توی خروجی واسه ما نمایش داده میشه بعنی بجای id به ما ref رو نشون میده
🔵و توی خط ۵ ما اومدیم فیلد رو با حروف کوچیک نوشتم که دفت کنید توی دیکد کردن اون فیلد رو نادیده میگیره
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔵 خوب این کد یه نمونه ساده از decode کردن json هست نمونه کد فوق خیلی واضح هست
🔵ما اومدیم یه استراکچر تغریف کردیم
🔵توی خط ۹ تا ۱۵ اومدیم بهش مقدار دادیم
🔵اگه دقت کنید توی خط ۴ ما اومدیم یه تگ بهش ادیم این تگ توی خروجی واسه ما نمایش داده میشه بعنی بجای id به ما ref رو نشون میده
🔵و توی خط ۵ ما اومدیم فیلد رو با حروف کوچیک نوشتم که دفت کنید توی دیکد کردن اون فیلد رو نادیده میگیره
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
❤1
Gopher Academy
✅نحوه استفاده از JSON با Go✅ ❌در ادامه آموزش خواهیم داد 🔴Default types 🟡 https://t.me/gopher_academy/743 🔴Encode (marshal) struct to JSON 🟡 https://t.me/gopher_academy/744 🔴Pretty print 🟡 https://t.me/gopher_academy/745 🔴Decode (unmarshal) JSON to struct…
🔴Pretty print
🔵برای اینکه خروجی رو بهتر بتونیم نشون بدیم توی خروجی از متد MarshalIndent استفاده می کنیم
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔵برای اینکه خروجی رو بهتر بتونیم نشون بدیم توی خروجی از متد MarshalIndent استفاده می کنیم
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
Gopher Academy
✅نحوه استفاده از JSON با Go✅ ❌در ادامه آموزش خواهیم داد 🔴Default types 🟡 https://t.me/gopher_academy/743 🔴Encode (marshal) struct to JSON 🟡 https://t.me/gopher_academy/744 🔴Pretty print 🟡 https://t.me/gopher_academy/745 🔴Decode (unmarshal) JSON to struct…
🔴Decode (unmarshal) JSON to struct
🔵 برای اینکه بخوایم jsonخود را decodeکنیم و توی خروجی نمایش بدیم یه سری از عناصر داخل فرم json رو مطابق کد فوق از تابع Unmarshal توی خط ۲۱ استفاده می کنیم
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔵 برای اینکه بخوایم jsonخود را decodeکنیم و توی خروجی نمایش بدیم یه سری از عناصر داخل فرم json رو مطابق کد فوق از تابع Unmarshal توی خط ۲۱ استفاده می کنیم
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
Gopher Academy
✅نحوه استفاده از JSON با Go✅ ❌در ادامه آموزش خواهیم داد 🔴Default types 🟡 https://t.me/gopher_academy/743 🔴Encode (marshal) struct to JSON 🟡 https://t.me/gopher_academy/744 🔴Pretty print 🟡 https://t.me/gopher_academy/745 🔴Decode (unmarshal) JSON to struct…
🔴Arbitrary objects and arrays
🔵 کد فوق را در نظر بگیرید ما میخوایم توی خروجی type هر value رو بدونیم چیه
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔵 کد فوق را در نظر بگیرید ما میخوایم توی خروجی type هر value رو بدونیم چیه
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔴سری اول برگه تقلب🔴
🔵blockchain
🟢 https://t.me/gopher_academy/748
🔵docker
🟢 https://t.me/gopher_academy/758
🔵docker compose
🟢 https://t.me/gopher_academy/759
🔵 docker swarm
🟢 https://t.me/gopher_academy/760
🔵github actions
🟢 https://t.me/gopher_academy/761
#cheat_sheet
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔵blockchain
🟢 https://t.me/gopher_academy/748
🔵docker
🟢 https://t.me/gopher_academy/758
🔵docker compose
🟢 https://t.me/gopher_academy/759
🔵 docker swarm
🟢 https://t.me/gopher_academy/760
🔵github actions
🟢 https://t.me/gopher_academy/761
#cheat_sheet
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
This media is not supported in your browser
VIEW IN TELEGRAM
🔵ویدیوی اختصاصی فعالیتهای من در سال ۱۳۹۹
🟢 ادرس ویرگول من:(جهت مشاهده تمامی پست های من تو حوزه گولنگ)
🔴 https://virgool.io/@bardiiia
🟡 جزییات بیشتر
🟣 https://vrgl.ir/2CXRR
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🟢 ادرس ویرگول من:(جهت مشاهده تمامی پست های من تو حوزه گولنگ)
🔴 https://virgool.io/@bardiiia
🟡 جزییات بیشتر
🟣 https://vrgl.ir/2CXRR
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔴سری دوم برگه تقلب🔴
🔵graphql
🟢 https://t.me/gopher_academy/764
🔵kubernetes
🟢 https://t.me/gopher_academy/765
🔵Linux
🟢 https://t.me/gopher_academy/766
🔵 mongodb
🟢 https://t.me/gopher_academy/767
🔵terraform
🟢 https://t.me/gopher_academy/768
🔴سری اول برگه تقلب🔴
🔵blockchain
🟢 https://t.me/gopher_academy/748
🔵docker
🟢 https://t.me/gopher_academy/758
🔵docker compose
🟢 https://t.me/gopher_academy/759
🔵 docker swarm
🟢 https://t.me/gopher_academy/760
🔵github actions
🟢 https://t.me/gopher_academy/761
#cheat_sheet
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔵graphql
🟢 https://t.me/gopher_academy/764
🔵kubernetes
🟢 https://t.me/gopher_academy/765
🔵Linux
🟢 https://t.me/gopher_academy/766
🔵 mongodb
🟢 https://t.me/gopher_academy/767
🔵terraform
🟢 https://t.me/gopher_academy/768
🔴سری اول برگه تقلب🔴
🔵blockchain
🟢 https://t.me/gopher_academy/748
🔵docker
🟢 https://t.me/gopher_academy/758
🔵docker compose
🟢 https://t.me/gopher_academy/759
🔵 docker swarm
🟢 https://t.me/gopher_academy/760
🔵github actions
🟢 https://t.me/gopher_academy/761
#cheat_sheet
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔴کنفرانس نرمافزار های آزاد و متنباز کرجلاگ با همراهی گروههای کاربری لینوکس از جمله
🟢شیرازلاگ
🟢اهوازلاگ
🟢اراکلاگ
🟢اصفهانلاگ
🟡در قالب شش ارائه فنی برگزار خواهد شد
🔵برای کسب اطلاعات و ثبتنام به آدرس ایوند درج شده در https://karajlug.org مراجعه نمایید
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🟢شیرازلاگ
🟢اهوازلاگ
🟢اراکلاگ
🟢اصفهانلاگ
🟡در قالب شش ارائه فنی برگزار خواهد شد
🔵برای کسب اطلاعات و ثبتنام به آدرس ایوند درج شده در https://karajlug.org مراجعه نمایید
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
👍1
🔰Practical Cryptography With Go
🔺 https://leanpub.com/gocrypto/read#leanpub-auto-chapter-1-introduction
🔹 یه کتاب خوب در مورد اصول Cryptography در گولنگ
❎ تو زمینه بلاکچین برای کسایی که میخوان کارکنن مفیده
🔰 @gopher_academy
🔺 https://leanpub.com/gocrypto/read#leanpub-auto-chapter-1-introduction
🔹 یه کتاب خوب در مورد اصول Cryptography در گولنگ
❎ تو زمینه بلاکچین برای کسایی که میخوان کارکنن مفیده
🔰 @gopher_academy
🔴 فرق Structs با Maps
🟢For map:
🟡All key and value are of same type.
🟡When keys are indexed and we can iterate over them.
🟡Closely related and significant value type.
🟡Don’t need to know all the keys at compile time.
🟡Key are indexed- we can iterate over them.
🟡Reference type
🟢For struct:
🟡All values can be of different type.
🟡Need to know all the different fields at compile time.
🟡Keys don’t support indexing
🟡Value type.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🟢For map:
🟡All key and value are of same type.
🟡When keys are indexed and we can iterate over them.
🟡Closely related and significant value type.
🟡Don’t need to know all the keys at compile time.
🟡Key are indexed- we can iterate over them.
🟡Reference type
🟢For struct:
🟡All values can be of different type.
🟡Need to know all the different fields at compile time.
🟡Keys don’t support indexing
🟡Value type.
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔸استخدام Golang Developer در شرکت تجارت بین الملل رابین تهران
🔹حقوق بیش از ۱۲ میلیون تومان 🔹تماموقت 🔹ارشد (Senior)
🔗 https://quera.ir/r/jLtBq9
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy
🔹حقوق بیش از ۱۲ میلیون تومان 🔹تماموقت 🔹ارشد (Senior)
🔗 https://quera.ir/r/jLtBq9
➖➖➖➖➖➖➖➖➖
🔰 @gopher_academy