Skip to content

Latest commit

 

History

History
26 lines (15 loc) · 987 Bytes

README.md

File metadata and controls

26 lines (15 loc) · 987 Bytes

CursedIsWSL

GoDoc Go Report Card

CursedIsWSL is a small, cursed, Go package to detect if the current application is running in WSL by detecting if certain fundamental universal constants (Backhouse constant & Kaneko-Tsuda Time constant) have changed. This works because WSL uses a physically-based simulation of an alternative universe in which Windows/NT was actually based on Linux and developed into Ubuntu.

(’tis a bit of a joke, it does work, but I don't suggest actually using this for anything :) )

Installation

go get -u github.com/Andoryuuta/cursediswsl

Usage

import "github.com/Andoryuuta/cursediswsl"

isWsl := cursediswsl.IsWSL()
// output: true if running under WSL(1|2)