Notice: Trying to access array offset on value of type null in /customers/1/2/4/ on line 390 Notice: Trying to access array offset on value of type null in /customers/1/2/4/ on line 337 Notice: Trying to access array offset on value of type null in /customers/1/2/4/ on line 283 Deprecated: Function get_magic_quotes_runtime() is deprecated in /customers/1/2/4/ on line 18 Deprecated: Function get_magic_quotes_gpc() is deprecated in /customers/1/2/4/ on line 23 - webMr.Waggel's blog

Golang serving resume able file downloads with net/http

30 March, 2020

Here is a fully commented example golang function on how to serve and transmit files to clients with the go net/http package. It supports the "Accept-Ranges" header, which allows for downloads to be paused or interrupted and resumed later on. This is very useful for clients who don't have stable connections to download larger files. However this function does not support Multipart downloads, if you wish to have that functionality check this function in the net/http source code for implementation.

This function is written with the following sources RFC 7233 section 3.1MDN Range Requests and Content Range.

Overload CSS `cursor: wait` page wide with jquery

04 December, 2018



You probably want to tell users on your page to wait for something important that is happening in the background. Most likely performing asynchronous page calls, calculations, DOM manipulation etc...

But just like any CSS property, the nested elements override the parent's property. This is troublesome if you have a lot of buttons and custom cursors in your style.

Golang Beego use models in your controllers

03 January, 2017

This post is meant to guide you on how to use models inside your controllers, not using the ORM way. Meaning you can implement your own reusable functions, another way of handeling your queries and even better, choose another database besides MySQL, Sqlite, PostgreSQL which ORM only supports.

Golang Beego automatically load templates

31 December, 2016

In this small post on how to automatically load a template so you don't have to 'include' your header and footer for every controller.