Maezyn
Maezyn
  • 11
  • 1 987
Embed Directive - Go Programming
In this video, we are going to be discussing how to use the "go:embed" compiler directive within a Go web application. It will be used to bundle HTML templates and static assets into a single binary at build time rather than dynamically accessing them at runtime. We will also discuss when it may be beneficial to use this for deployment. Learn more about how to use the "go:embed" compiler directive from the Go standard library in this educational video.
#go #golang #embed #standardlibrary #stdlib #html #template #ssr #http #server #coding #programming #computerscience
🔗 Resources
Embed Package - pkg.go.dev/embed
Documentation for "fs.Sub" - pkg.go.dev/io/fs#Sub
📚 Topics Covered:
- Overview of the "go:embed" Compiler Directive
- Embedding HTML Templates and Static Assets
- Modifying the Static File Route with the "fs.Sub" function
- Limitations of "go:embed" Compiler Directive
- Benefits of Deploying as a Single Binary
มุมมอง: 149

วีดีโอ

HTMX with Go - Go Programming
มุมมอง 79921 วันที่ผ่านมา
In this video, we are going to be discussing how to use HTMX within a Go web application to perform AJAX updates to achieve SPA-like (single page application) functionality. This tutorial builds on top of the "net/http" and "html/template" packages from the Go standard library. We will be dynamically updating a list using "hx-post", "hx-target", and "hx-swap" with partial templates, also referr...
HTML Templates - Go Programming
มุมมอง 29921 วันที่ผ่านมา
In this video, we are going to be discussing how the "html/template" package from the Go standard library can be used to render dynamic templates. Learn more about how to perform server-side rendering (SSR) directly with Go in this educational video. #go #golang #standardlibrary #stdlib #html #template #ssr #http #server #coding #programming #computerscience 🔗 Resources HTML Template Documentat...
Serving Static Files - Go Programming
มุมมอง 54หลายเดือนก่อน
In this video, we are going to be discussing how to use the static file server from Go's standard library. Learn more about static files and how to serve them using Go in this educational video. #go #golang #standardlibrary #stdlib #routing #router #staticfiles #http #server #coding #programming #computerscience 🔗 Resources FileServer Function (net/http) - pkg.go.dev/net/http#FileServer ServeFi...
Standard Library Router - Go Programming
มุมมอง 228หลายเดือนก่อน
In this video, we are going to be discussing how HTTP routing in Go works including the recent routing enhancements introduced in release version 1.22. Learn more about the fundamental routing concepts in Go in this educational video. #go #golang #standardlibrary #stdlib #routing #router #http #server #coding #programming #computerscience 🔗 Resources Routing Enhancements - go.dev/blog/routing-e...
Creating a HTTP Server - Go Programming
มุมมอง 792 หลายเดือนก่อน
In this video, we are going to be building a basic web server in Go that we will expand upon in future videos. To do this, we'll make use of the standard library, most notably the net/http package. This package received major improvements to its routing functionality in patch 1.22. Learn more about how to create a web server in Go in this educational video. #go #golang #standardlibrary #stdlib ...
Dependency Injection - Design Patterns
มุมมอง 213 หลายเดือนก่อน
Dependency injection is a design pattern that allows you to decouple an application from its dependencies. This is achieved by taking an object and explicitly injecting the dependencies it requires rather than having it construct them internally. This helps separate the concerns between object creation and usage, resulting in a program that is more loosely coupled. Learn more about dependency i...
Code Golf - The Art of Code
มุมมอง 1813 หลายเดือนก่อน
Code golfing is a fun topic within computer science where a programmer must solve a coding challenge using as few characters as possible. It is a generalization that stems from the concept of Kolmogorov complexity. Learn more about code golfing in this animated, educational video. #codegolf #codegolfing #programming #computerscience #recursion #fibonacci 🔗 Resources Code Golf Challenges - code....
Quines - The Art of Code
มุมมอง 663 หลายเดือนก่อน
A quine is a non-trivial computer program that takes no input and produces a copy of its own source code as its only output. This is also referred to as self-replicating code. Learn more about quines in this animated, educational video. #quines #programming #computerscience #recursion 🔗 Resources Quines - en.wikipedia.org/wiki/Quine_(computing) Kleene's Recursion Theorem - en.wikipedia.org/wiki...
Stack - Abstract Data Types
มุมมอง 922 ปีที่แล้ว
In this video, we explore a 3D visualization of the stack data structure.

ความคิดเห็น

  • @AndreFerreira-jv3qy
    @AndreFerreira-jv3qy 10 วันที่ผ่านมา

    Great explanation again! What are you using to get the code completion? Is it copilot?

    • @Maezyn
      @Maezyn 9 วันที่ผ่านมา

      Thanks! I’ve used Copilot before but I’m now using Codeium since it has a free tier.

  • @jhalmu
    @jhalmu 15 วันที่ผ่านมา

    Can we have code example without "demo purpose" :) Thanks for these videos.

    • @Maezyn
      @Maezyn 15 วันที่ผ่านมา

      Definitely! My goal for these initial fundamental videos has been to keep the code simple so I can focus on the concept being explained. However, I do want to make more advanced / realistic project videos or series soon too.

  • @Tay74514
    @Tay74514 16 วันที่ผ่านมา

    +1 sub🎉

  • @AndreFerreira-jv3qy
    @AndreFerreira-jv3qy 18 วันที่ผ่านมา

    Great video man! Are you planning to release more Go related content in the future? Something about testing would be great!

    • @Maezyn
      @Maezyn 17 วันที่ผ่านมา

      Thanks, glad you liked it! And yes, Go is one of my favorite languages so definitely planning on making more and I’ll be sure to include one on testing! Also planning on branching out to other languages and concepts too.

  • @shadowfaxenator
    @shadowfaxenator 21 วันที่ผ่านมา

    Do not parse templates in a handler

    • @Maezyn
      @Maezyn 21 วันที่ผ่านมา

      True, thanks for pointing this out.

    • @Tay74514
      @Tay74514 17 วันที่ผ่านมา

      @@Maezynit’s fine for prototyping

  • @Alexander-d7s3j
    @Alexander-d7s3j 22 วันที่ผ่านมา

    LFG montana tech

  • @Alexander-d7s3j
    @Alexander-d7s3j 25 วันที่ผ่านมา

  • @Alexander-d7s3j
    @Alexander-d7s3j 25 วันที่ผ่านมา

    Thanks for the video, waiting for more!

  • @Alexander-d7s3j
    @Alexander-d7s3j 25 วันที่ผ่านมา

    Good video, keep up the good work! PS: your channel's banner seems to be broken

  • @Alexander-d7s3j
    @Alexander-d7s3j 25 วันที่ผ่านมา

    I was watching your video thinking you had like thousands of subs and stuff like that. The quality is so nice its shocking you're new on this. You have a new sub, live strong!

    • @Maezyn
      @Maezyn 22 วันที่ผ่านมา

      Thanks, I really appreciate all your kind words! Hoping to keep improving the quality of my videos and branch out into more topics too!

  • @Tonybyn
    @Tonybyn 25 วันที่ผ่านมา

    Never used Go, don't really plan on using it anytime soon, clicked on this random video out of curiosty, and tbh it was really interesting! good stuff man

    • @Maezyn
      @Maezyn 22 วันที่ผ่านมา

      Thanks, glad you liked it! I plan on covering a lot more topics than Go so I hope you'll find my future videos interesting too!

  • @lordlyamiga
    @lordlyamiga หลายเดือนก่อน

    i earlier used html put 1 in file output will just 1 lol ig it's not a valid solution

    • @Maezyn
      @Maezyn หลายเดือนก่อน

      Haha I think that might fall under the "cheating" quine category

  • @petrospaulos7736
    @petrospaulos7736 หลายเดือนก่อน

    The best code-golf community is in stackexchange. Thousands of golfers and thousands of challenges have been released there... how did you miss that?

  • @frankdearr2772
    @frankdearr2772 2 หลายเดือนก่อน

    Great topic, thanks

    • @Maezyn
      @Maezyn 2 หลายเดือนก่อน

      No problem, planning to make more Go videos soon

  • @MustafaElghisha
    @MustafaElghisha 2 หลายเดือนก่อน

    Good video, deserve SUB

    • @Maezyn
      @Maezyn 2 หลายเดือนก่อน

      Thanks, glad you liked it!

  • @nestorddiaz
    @nestorddiaz 3 หลายเดือนก่อน

    Hi! Subscriber #2 here.😜 Nice video, and I also liked the one about Quines. I just started Code Golfing very recently and I love it. Good luck with your channel!

    • @Maezyn
      @Maezyn 3 หลายเดือนก่อน

      Hey, appreciate the kind words! And agreed, I also really enjoy code golfing but am still amazed how far off I am from each of the code.golf challenge leaderboards. Thanks for checking out the videos and hope you find my future ones interesting as well!