Go Templates - Simple and Powerful

  Рет қаралды 22,857

Donald Feury

Donald Feury

Күн бұрын

🎨 Artist/Thumbnail Creator: jawhaj.art
📝 Blog: donaldfeury.xyz/topics
👥Memberships: vod.strms.net/j/UCTHij3Ac5Giz...
🖥 Example Code: gitlab.com/dak425/go-template...
Without even needing to use a framework, go has a very powerful and extendable template package in the standard library.
It can be used for generating HTML pages, simple text documents, or even generating boilerplate code for your project.
THANK YOU ###
Newest Channel Member -
Newest Subscriber - Phillip Lineburg
WANT TO SUPPORT THE CHANNEL? ###
💰 Support Links: donaldfeury.xyz/donate
WANT TO ASK ME A QUESTION? ###
💬 Contact Me: donaldfeury.xyz/contact
SOCIAL PLATFORMS ###
🗣 Matrix: donaldfeury.xyz/matrix
💬 Pleroma: donaldfeury.xyz/pleroma
🗨️ Discord: donaldfeury.xyz/discord
🐦 Twitter: donaldfeury.xyz/twitter
VIDEO PLATFORMS ###
🎦 Twitch: donaldfeury.xyz/twitch
🎥 Odysee: donaldfeury.xyz/odysee
OTHER THINGS ###
📁 GitLab: donaldfeury.xyz/gitlab
🎥 My Gear: kit.co/dfeury
SOFTWARE I USE ###
🌐 Brave Browser - brave.com/
🎞 ffmpeg: ffmpeg.org/
📽️ Open Broadcaster Software: obsproject.com/
🎨 GIMP: www.gimp.org/
📙 Neovim: neovim.io/
Thank ya'll for your time and support!
#golang #go #templates

Пікірлер: 27
@DonaldFeury
@DonaldFeury 4 жыл бұрын
Ya'll got any ideas for what you can do with the template package? The code generation tricks seems pretty useful.
@Aloysius1966
@Aloysius1966 4 жыл бұрын
Reporting. I'd like to build a webApp to query all my various storage arrays and post the metrics to a web page. Like total space, used space, etc. Basically, capacity planning stuff. Cool video. Thanks for posting.
@DonaldFeury
@DonaldFeury 4 жыл бұрын
Oh that sounds pretty neat. So basically you would run some commands, such as *df* , to grab disk usage info, pass that into a go template and produce a static web page?
@Aloysius1966
@Aloysius1966 4 жыл бұрын
@@DonaldFeury Exactly! I'd do that with the whole stack: storage, compute (hardware + hypervisor) & networking metrics. I'd call it "Dr Datacenter" .... if i knew how to program :-)
@DonaldFeury
@DonaldFeury 4 жыл бұрын
Could just learn how to do each piece individually, then finally figure out how combine them. I use that approach to learning all the time.
@fairclothjm
@fairclothjm 4 жыл бұрын
I have used it to generate config files for servers, services, etc
@tomontheinternet
@tomontheinternet 3 жыл бұрын
Thanks Donald. Good intro to templates! Also, love that Hermit font.
@DonaldFeury
@DonaldFeury 3 жыл бұрын
Thank ya Tom and oh yes I love that font
@RootsterAnon
@RootsterAnon Жыл бұрын
Wow, this is great, i didn't know about this features, so useful!
@ericmarquez6747
@ericmarquez6747 2 жыл бұрын
Thanks for the walkthrough on templates. I'm looking at doing a project to automate some data center switch syntax.
@Greatbubba747
@Greatbubba747 2 ай бұрын
Great explainer video! I loved that it is to-the-point and easy to understand.
@jijosunny8626
@jijosunny8626 3 жыл бұрын
Thank you , this is a very good intro to templates! Finally, i understood how helm processes its templates :)
@DonaldFeury
@DonaldFeury 2 жыл бұрын
I have saved another mind from the confusion of templates
@morkhoudia9
@morkhoudia9 4 ай бұрын
Awesome
@YBWang-pi9qq
@YBWang-pi9qq 2 жыл бұрын
the part of generating golang code is really cool.
@rawriamakittyrawr
@rawriamakittyrawr 2 жыл бұрын
Thank you so much, I finally understand that damn dot
@DonaldFeury
@DonaldFeury 2 жыл бұрын
I'm glad I cleared that up for someone 😂
@AneeshKumarUSA
@AneeshKumarUSA 9 ай бұрын
What is the best way to insert dynamic data in client-side javascript? JS also uses double curly braces. Vs code shows errors, but it compiles and runs. BTW, I am using chart.js for client side charting. Any suggestions?
@Kleinepaps
@Kleinepaps 2 жыл бұрын
Hi, it's been a while since this video, but can you use text/template to generate a yaml file from the combination of an override yaml + the template yaml?
@redlinenorma1
@redlinenorma1 11 ай бұрын
Yes, you can. Helm uses go templates exactly for that, for example
@evans8245
@evans8245 3 жыл бұрын
WOW ! AT THIS RATE ! YOU'LL MAKE THOUSANDS OF PENNIES WITH A BLOGGING PLATFORM !
@DonaldFeury
@DonaldFeury 3 жыл бұрын
wut
@evans8245
@evans8245 3 жыл бұрын
@@DonaldFeury just having a laugh, mate ! thanks for the video
MANY ERRORS, HANDLE IT - Go / Golang Error Tutorial | #feurious
13:53
HTML Templates Instead Of Reactivity | Prime Reacts
12:42
ThePrimeTime
Рет қаралды 110 М.
Was ist im Eis versteckt? 🧊 Coole Winter-Gadgets von Amazon
00:37
SMOL German
Рет қаралды 40 МЛН
Русалка
01:00
История одного вокалиста
Рет қаралды 6 МЛН
🤔Какой Орган самый длинный ? #shorts
00:42
A Very Simple Tech Stack
7:58
Awesome
Рет қаралды 69 М.
HTMX & Go with ThePrimeagen | Preview
15:58
Frontend Masters
Рет қаралды 148 М.
Cache ALL THE THINGS using Redis with Golang / Go | #feurious
13:16
Go 1.22 is bringing about a new future for the language.
4:32
Dreams of Code
Рет қаралды 150 М.
David Crawshaw   SQLite and Go
32:03
Go Northwest
Рет қаралды 35 М.
A Crash Course on Go Templates
26:09
Google Developers Space
Рет қаралды 16 М.
The standard library now has all you need for advanced routing in Go.
13:52
The BEST Tool to Structure Golang Projects
7:58
Melkey
Рет қаралды 21 М.
Mastering Dependency Injection In Golang
14:29
Anthony GG
Рет қаралды 45 М.
How I Developed an AMAZING Go App with Templ + Air + Gin
13:55
Coding with Mat
Рет қаралды 2,4 М.
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 8 МЛН
ГОСЗАКУПОЧНЫЙ ПК за 10 тысяч рублей
36:28
Ремонтяш
Рет қаралды 455 М.
$1 vs $100,000 Slow Motion Camera!
0:44
Hafu Go
Рет қаралды 24 МЛН
⚡️Супер БЫСТРАЯ Зарядка | Проверка
1:00
Я УКРАЛ ТЕЛЕФОН В МИЛАНЕ
9:18
Игорь Линк
Рет қаралды 126 М.