Skip to content

Instantly share code, notes, and snippets.

View 8lall0's full-sized avatar
🐣
ugh...

Savino Pio Liguori 8lall0

🐣
ugh...
View GitHub Profile
@8lall0
8lall0 / main.go
Last active October 26, 2023 22:48
Code100Puzzle - Code Block
package main
import (
"encoding/json"
"fmt"
"strings"
)
type CodeCompetition struct {
Columns int `json:"columns"`
@8lall0
8lall0 / go2errorproposalfeedback.md
Last active October 13, 2018 09:25
Feedback for Go2 error handling design

Honest to God, i agree with Alessandro Arzilli feedback.

Having a check statement near a function imho can make readability worse.

If we want to handle errors and avoid err != nil, i would like something like this:

From:

func Foo() (err error) {
 handle err { return fmt.Errorf("error: %v", err) }
@8lall0
8lall0 / copy_span.html
Last active June 21, 2018 15:17
How to copy the content of a span on click in javascript (no jQuery)
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
.copyInput {
border: none;
overflow: auto;
outline: none;