Clean-Swift source and test code auto-generator. It can save you time typing 500-600 lines of code.

Clean-Swift source & test code auto generator

Go

Overview

Run

Output

Basic Usage

make config.yaml

target_project_name: Miro // target project name
copyright: Geektree0101 // copyright
template_path: ./templates // templates path
source_path: ./Playground/Sources // base source file destination
test_path: ./Playground/Tests // base test file destination
indentation: 2 // indentation

add clean_swift_scaffold runner command on your command

var rootCmd = &cobra.Command{
	Use:   "your cmd",
	Short: "your cmd short marty",
	Long:  "your cmd long something",
}

init() {
  rootCmd.AddCommand(clean_swift_scaffold.NewRunnerCommand("**use_name**"))
}

func Execute() {
	if err := rootCmd.Execute(); err != nil {
		fmt.Fprintln(os.Stderr, err)
		os.Exit(1)
	}
}

run

your_command **use_name** -n Feed -u Fetch,Delete,Update

flag list

- -n/--name: scene prefix
- -u/--usecase: some model behavior (such as Fetch, Get, Reload, Delete and so on)
- -c/--config: config.yaml path ./some_dir/config.yaml or ./some_dir/some_config.yaml
- -s/--source: custom base source_dir (Default values follow the configuration file.)
- -t/--test: custon base test_dir (Default values follow the configuration file.)
  • Please set the name and directory of the configuration file freely. Instead, please enter the correct path on -c/--config flag.
  • Default values of source & test directoly flag follow the configuration file.
Owner
Similar Resources

this is an api that execute your deno code and send you the output

this a simple api that execute your deno code and send you the output, has not limit per request example request: in deno: const rawResponse = await f

Dec 23, 2022

🤖🤝A tool to test and analyze storage and retrieval deal capability on the Filecoin network.

Dealbot A tool to test and analyze storage and retrieval deal capability on the Filecoin network. Getting Started Clone the repo and build: git clone

Sep 10, 2022

Golang source code parsing, usage like reflect package

gotype Golang source code parsing, usage like reflect package English 简体中文 Usage API Documentation Examples License Pouch is licensed under the MIT Li

Dec 9, 2022

Source code of Liteloader Tools

LiteLoader Tools This repository store the source code of some LiteLoader Tools Prebuilt Binary see /bin folder Image2Binary [Golang] convert Image(jp

Aug 30, 2022

💪 Helper Utils For The Go: string, array/slice, map, format, cli, env, filesystem, test and more.

💪 Helper Utils For The Go: string, array/slice, map, format, cli, env, filesystem, test and more.

💪 Helper Utils For The Go: string, array/slice, map, format, cli, env, filesystem, test and more. Go 的一些工具函数,格式化,特殊处理,常用信息获取等等

Jan 6, 2023

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Continuous profiling for analysis of CPU, memory usage over time, and down to the line number. Saving infrastructure cost, improving performance, and increasing reliability.

Jan 2, 2023

Fast and scalable pseudorandom generator for Go

fastrand Fast pseudorandom number generator. Features Optimized for speed. Performance scales on multiple CPUs. How does it work? It abuses sync.Pool

Dec 22, 2022

GoDynamic can load and run Golang dynamic library compiled by -buildmode=shared -linkshared

GoDynamic can load and run Golang dynamic library compiled by -buildmode=shared -linkshared How does it work? GoDynamic works like a dynamic

Sep 30, 2022

Otx - otx tool can scrap to find sensitive information and vulnerable endpoint urls.

Otx - otx tool can scrap to find sensitive information and vulnerable endpoint urls.

otx Description This tool is base on AlienVault Open Threat Exchange (OTX)? and this tool can help you to extract all the urls endpoints which can be

Sep 24, 2022
Comments
  • Support a procedural command line scanner RunnerCommand

    Support a procedural command line scanner RunnerCommand

    Before

    some_cmd <use> --name PreopenDetail --usecases Reload,Next --config ./scaffold/some_config.yaml
    

    After

    some_cmd <use> 
    Name: PreopenDetail
    Usecases: Reload,Next
    Config: ./scaffold/some_config.yaml
    
  • Support a created by someone

    Support a created by someone

    Solutions

    get os username from os/user

    package main
    
    import (
    	"fmt"
    	"log"
    	"os/user"
    )
    
    func main() {
    
    	user, err := user.Current()
    	if err != nil {
    		log.Fatalf(err.Error())
    	}
    
    	username := user.Username
    
    	fmt.Printf("Username: %s\n", username)
    }
    

    Before

    //
    //  __SCENE_NAME__Router.swift
    //  __TARGET_PROJECT_NAME__
    //
    //  Created by clean-swift-scaffold on __DATE__.
    //  Copyright © __YEAR__ __COPYRIGHT__. All rights reserved.
    //
    

    After

    //
    //  __SCENE_NAME__Router.swift
    //  __TARGET_PROJECT_NAME__
    //
    //  Created by __WHO__ on __DATE__.
    //  Copyright © __YEAR__ __COPYRIGHT__. All rights reserved.
    //
    
go-linereader: A small library for streaming lines from an io.Reader.

go-linereader: A small library for streaming lines from an io.Reader.

Oct 25, 2021
Code generator that generates boilerplate code for a go http server

http-bootstrapper This is a code generator that uses go templates to generate a bootstrap code for a go http server. Usage Generate go http server cod

Nov 20, 2021
With Pasteback you can store common terms and paste them back to clipboard

Pasteback With Pasteback you can store common terms and paste them back to clipboard when needed. There is one central spot to put every string into y

Nov 22, 2021
JIN the coolest fighting game ever made that uses the M.U.G.E.N engine so heres how you can build it

JIN the coolest fighting game ever made that uses the M.U.G.E.N engine so heres how you can build it

Jan 24, 2022
A simple tool to auto remove unused imports in rust

rust_strip A simple tool to remove unused imports in RUST. Call Cargo build/test Process the warning logs of unused imports Then replace the involved

Oct 15, 2022
graceful is a resource termination library to smoothly clean up resources on term signals

graceful graceful is a resource termination library to smoothly clean up resources on term signals. example package main

Aug 26, 2021
Clean up unused AWS resources

vacuum Vacuum your AWS account of unused resources to save you ?? ?? !! To run: vacuum all ▒▒▒▒▒▒▒▒▒▒▒▒

Aug 10, 2022
Versatile Go code generator.
Versatile Go code generator.

Generis Versatile Go code generator. Description Generis is a lightweight code preprocessor adding the following features to the Go language : Generic

Nov 30, 2022
Jennifer is a code generator for Go

Jennifer Jennifer is a code generator for Go. package main import ( "fmt" . "github.com/dave/jennifer/jen" ) func main() { f := NewFile("m

Jan 4, 2023
A prototype code-generator library for golang.

A prototype code-generator library for golang.

Jul 28, 2022