Skip to content

Commit

Permalink
Merge pull request #2160 from slingamn/embed
Browse files Browse the repository at this point in the history
fix #2157
  • Loading branch information
slingamn authored May 29, 2024
2 parents d81494a + af521c8 commit ad0149b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ergo.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package main

import (
"bufio"
_ "embed"
"fmt"
"log"
"os"
Expand All @@ -26,6 +27,9 @@ import (
var commit = "" // git hash
var version = "" // tagged version

//go:embed default.yaml
var defaultConfig string

// get a password from stdin from the user
func getPasswordFromTerminal() string {
bytePassword, err := term.ReadPassword(int(syscall.Stdin))
Expand Down Expand Up @@ -94,6 +98,7 @@ Usage:
ergo importdb <database.json> [--conf <filename>] [--quiet]
ergo genpasswd [--conf <filename>] [--quiet]
ergo mkcerts [--conf <filename>] [--quiet]
ergo defaultconfig
ergo run [--conf <filename>] [--quiet] [--smoke]
ergo -h | --help
ergo --version
Expand Down Expand Up @@ -173,6 +178,8 @@ Options:
if err != nil {
log.Fatal("Error while importing db:", err.Error())
}
} else if arguments["defaultconfig"].(bool) {
fmt.Print(defaultConfig)
} else if arguments["run"].(bool) {
if !arguments["--quiet"].(bool) {
logman.Info("server", fmt.Sprintf("%s starting", irc.Ver))
Expand Down

0 comments on commit ad0149b

Please sign in to comment.