removed test output
This commit is contained in:
parent
6f0b534d8d
commit
0604920f4f
13 changed files with 0 additions and 289 deletions
|
|
@ -1,4 +0,0 @@
|
|||
# test-test
|
||||
|
||||
## TLDR;
|
||||
A test program generated by bubblewand
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"specCon18/test-test/tui"
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "test-test",
|
||||
Short: "test-test, A test program generated by bubblewand",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
if err := tui.Run(); err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
cobra.CheckErr(rootCmd.Execute())
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print the version number of test-test",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("test-test ~ 0.0.6")
|
||||
},
|
||||
}
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func Init() {
|
||||
viper.SetConfigName("config") // config.yaml
|
||||
viper.SetConfigType("yaml")
|
||||
viper.AddConfigPath(".")
|
||||
|
||||
err := viper.ReadInConfig()
|
||||
if err != nil {
|
||||
fmt.Println("No config file found; using defaults.")
|
||||
}
|
||||
|
||||
viper.SetDefault("app.theme", "dark")
|
||||
}
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
# This flake was initially generated by fh, the CLI for FlakeHub (version 0.1.22)
|
||||
{
|
||||
# A helpful description of your flake
|
||||
description = "A test program generated by bubblewand";
|
||||
|
||||
# Flake inputs
|
||||
inputs = {
|
||||
flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*";
|
||||
|
||||
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*";
|
||||
};
|
||||
|
||||
# Flake outputs that other flakes can use
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
flake-schemas,
|
||||
nixpkgs,
|
||||
}:
|
||||
let
|
||||
# Helpers for producing system-specific outputs
|
||||
supportedSystems = [ "x86_64-linux" ];
|
||||
forEachSupportedSystem =
|
||||
f:
|
||||
nixpkgs.lib.genAttrs supportedSystems (
|
||||
system:
|
||||
f {
|
||||
inherit (nixpkgs) lib;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
# Schemas tell Nix about the structure of your flake's outputs
|
||||
schemas = flake-schemas.schemas;
|
||||
packages = forEachSupportedSystem (
|
||||
{ pkgs, lib }:
|
||||
{
|
||||
default = pkgs.callPackage (
|
||||
{ buildGoModule }:
|
||||
buildGoModule {
|
||||
pname = "test-test";
|
||||
version = "0.0.6";
|
||||
src = builtins.path {
|
||||
name = "source";
|
||||
path = ./.;
|
||||
};
|
||||
vendorHash = "";
|
||||
}
|
||||
) { };
|
||||
}
|
||||
);
|
||||
# Development environments
|
||||
devShells = forEachSupportedSystem (
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
# Pinned packages available in the environment
|
||||
packages = with pkgs; [
|
||||
just
|
||||
gcc
|
||||
go_1_23
|
||||
nixpkgs-fmt
|
||||
gopls
|
||||
cobra-cli
|
||||
];
|
||||
env = {
|
||||
CGO_ENABLED = "1";
|
||||
CC = "gcc";
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
module specCon18/test-test
|
||||
|
||||
go 1.21
|
||||
|
||||
require (
|
||||
github.com/charmbracelet/bubbletea v0.25.0
|
||||
github.com/spf13/cobra v1.7.0
|
||||
github.com/spf13/viper v1.17.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
||||
github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||
github.com/magiconair/properties v1.8.7 // indirect
|
||||
github.com/mattn/go-isatty v0.0.18 // indirect
|
||||
github.com/mattn/go-localereader v0.0.1 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.14 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect
|
||||
github.com/muesli/cancelreader v0.2.2 // indirect
|
||||
github.com/muesli/reflow v0.3.0 // indirect
|
||||
github.com/muesli/termenv v0.15.2 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/sagikazarmark/locafero v0.3.0 // indirect
|
||||
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
|
||||
github.com/sourcegraph/conc v0.3.0 // indirect
|
||||
github.com/spf13/afero v1.10.0 // indirect
|
||||
github.com/spf13/cast v1.5.1 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/subosito/gotenv v1.6.0 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/multierr v1.9.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
|
||||
golang.org/x/sync v0.3.0 // indirect
|
||||
golang.org/x/sys v0.12.0 // indirect
|
||||
golang.org/x/term v0.6.0 // indirect
|
||||
golang.org/x/text v0.13.0 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
package logger
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/charmbracelet/log"
|
||||
)
|
||||
|
||||
var Log *log.Logger
|
||||
|
||||
func init() {
|
||||
Log = log.NewWithOptions(os.Stderr, log.Options{
|
||||
ReportCaller: false,
|
||||
ReportTimestamp: true,
|
||||
Prefix: "test-test",
|
||||
Level: log.InfoLevel,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
|
||||
# Set the shell
|
||||
set shell := ["bash", "-cu"]
|
||||
|
||||
# Build the Go project
|
||||
build:
|
||||
go build -o bin/app .
|
||||
|
||||
# Run the Go project
|
||||
run:
|
||||
go run .
|
||||
|
||||
# Run tests
|
||||
test:
|
||||
go test ./...
|
||||
|
||||
# Clean build artifacts
|
||||
clean:
|
||||
rm -rf bin
|
||||
|
||||
# Format the code
|
||||
fmt:
|
||||
go fmt ./...
|
||||
|
||||
# Tidy up go.mod/go.sum
|
||||
tidy:
|
||||
go mod tidy
|
||||
|
||||
# Init Go module (optional first step)
|
||||
init:
|
||||
go mod init
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
package main
|
||||
|
||||
import "specCon18/test-test/cmd"
|
||||
|
||||
func main() {
|
||||
cmd.Execute()
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
package tui
|
||||
|
||||
import tea "github.com/charmbracelet/bubbletea"
|
||||
|
||||
type model struct {
|
||||
count int
|
||||
}
|
||||
|
||||
func (m model) Init() tea.Cmd {
|
||||
return nil
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
package tui
|
||||
|
||||
import tea "github.com/charmbracelet/bubbletea"
|
||||
|
||||
func Run() error {
|
||||
p := tea.NewProgram(model{})
|
||||
_, err := p.Run()
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package tui
|
||||
|
||||
import tea "github.com/charmbracelet/bubbletea"
|
||||
|
||||
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
switch msg := msg.(type) {
|
||||
case tea.KeyMsg:
|
||||
switch msg.String() {
|
||||
case "q", "ctrl+c":
|
||||
return m, tea.Quit
|
||||
case "up":
|
||||
m.count++
|
||||
case "down":
|
||||
m.count--
|
||||
}
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
package tui
|
||||
|
||||
import "fmt"
|
||||
|
||||
func (m model) View() string {
|
||||
return "Counter: " + fmt.Sprintf("%d", m.count) + "\n[↑/↓ to change, q to quit]"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue