Giter Site home page Giter Site logo

go-touch's Introduction

go-touch

The go interpetation of UNIX touch command. The motivation behind this was I couldn't find anything like touch command in windows, so I decided to create my own.

It does not completely copies the command, if file exists it changes its timestamp, if it doesn't, creates a new file.

Installation

Go to the releases page, install touch.exe, and add directory, where touch.exe lives, to the PATH variable.

In Windows

set PATH=%PATH%;C:\path\to\dir\of\touch

Installation from source

Requirements for installing from sourcre

  • golang compiler >= 1.15

I didn't test it with old versions of go, so I wrote >=1.15, but I don't think it could fail with older versions


Clone the repository, and cd into it

git clone https://github.com/spitfire-hash/go-touch
cd go-touch

Install the package

go install spitfire-hash/touch

Don't forget to add your ~/go/bin directory to your PATH variable. First find the bin path:

go list -f '{{.Target}}'

Then the output should be something like this:

'C:\Users\<User>\go\bin\touch.exe'

You should add the C:\Users\<User>\go\bin to your PATH, you can do it by

set PATH=%PATH%;C:\path\to\your\install\directory

Usage

touch FILE

Tests

For running test just do

go test

In the repository directory.

go-touch's People

Contributors

m-spitfire avatar

Watchers

James Cloos 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.