Git Product home page Git Product logo

file-cleaner's Introduction

file-cleaner

文件删除工具,根据delete.conf文件中的内容删除

用法

Usage: file-cleaner [options...]
Version: 0.0.3
删除delete.conf文件中列出来的文件,需要设置CLOUD_HOME环境变量或者通过-c进行指定根目录

Options:
        -c set CLOUD_HOME directory for find delete.conf and delete files.
        -d set the delete conf file name at CLOUD_HOME dir, default is delete.conf.
        -h help info.

例如:

set CLOUD_HOME=D:\tempo
file-cleaner.exe

编译

make

output binary file: file-cleaner.exe version 0.0.3
buil success
Usage: file-cleaner [options...]
Version: 0.0.3
删除delete.conf文件中列出来的文件,需要设置CLOUD_HOME环境变量或者通过-c进行指定根目录

Options:
        -c set CLOUD_HOME directory for find delete.conf and delete files.
        -d set the delete conf file name at CLOUD_HOME dir, default is delete.conf.
        -h help info.

在Makefile中最后执行了exe,导致退出码不为0,所以make后有make: *** [Makefile:10: build] Error 1

编译时修改Makefile中的版本号VERSION变量即可

.PHONY: build

VERSION=0.0.3
BANIRY=file-cleaner.exe

build:
	@go build -ldflags "-X 'main.Version=${VERSION}'" -o ${BANIRY} main.go
	@echo output binary file: ${BANIRY} version ${VERSION}
	@echo buil success
	@${BANIRY}

编译所有架构

参考文章:Go 使用Makefile编译所有架构

file-cleaner's People

Contributors

flowerbirds avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.