Skip to content

Instantly share code, notes, and snippets.

@podikoglou
podikoglou / metrics.go
Created July 11, 2024 20:01
I really like this piece of code but I realised it's useless
package engine
import (
"sync/atomic"
"time"
"github.com/emirpasic/gods/maps/hashmap"
)
const (
type TabIndex = 0 | 1;
const tabsToRoutes: [TabIndex, string][] = [
[0, '/app'],
[1, '/app/profile'],
]
const tabToRoute = function(index: TabIndex): string {
return tabsToRoutes.find(entry => entry[0] == index)[1];
}