Skip to content

Instantly share code, notes, and snippets.

@Araq
Created July 15, 2020 18:15
Show Gist options
  • Save Araq/551262b4ab33630a21b8cd65d944da81 to your computer and use it in GitHub Desktop.
Save Araq/551262b4ab33630a21b8cd65d944da81 to your computer and use it in GitHub Desktop.
import strutils, os
type Target = tuple[repo, package, ext: string]
proc newTarget*(path: string): Target =
let splat = path.splitFile
result = (repo: splat.dir, package: splat.name, ext: splat.ext)
let mem = getOccupiedMem()
echo newTarget("meo")
echo "MEM IS ", getOccupiedMem() - mem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment