Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

Commit

Permalink
Implement version command
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jun 16, 2023
1 parent 03dbeaa commit 4d8a840
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nix-headbump.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,26 @@ package main

import (
"encoding/json"
"flag"
"fmt"
"io"
"log"
"net/http"
"os"
"regexp"
)

const version string = "0.1.0"

func main() {
versionFlag := flag.Bool("version", false, "print the version of this program")
flag.Parse()

if *versionFlag {
fmt.Printf("%s\n", version)
return
}

path := "default.nix"
isNixFileExist := true
if _, err := os.Stat(path); os.IsNotExist(err) {
Expand Down

0 comments on commit 4d8a840

Please sign in to comment.