Coder Social home page Coder Social logo

dups's Introduction

About Me

Junior backend developer focused on DevOps culture, lover of self-taught learning and open source, especially the Linux universe.


Languages and Tools


My Trophies


Github Stats

dups's People

Contributors

sirnoob97 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

u5surf

dups's Issues

Concurrent Test

Tests must be refactored for the concurrent version of the application.

Changes:

  • readTree function now receives a channel(paths) and a waitgroup(wg) as a parameter

    dups/main.go

    Line 34 in b91968d

    func readTree(directory string, paths chan string, wg *sync.WaitGroup) error {

  • getHash function no longer returns errors.

    dups/main.go

    Line 70 in b91968d

    func getHash(path string) fileHash {

  • getHash now shows errors with logFatal variable

    dups/main.go

    Lines 14 to 17 in b91968d

    var (
    logFatal = log.Fatal
    ignore = []string{".git"}
    )

    dups/main.go

    Lines 72 to 74 in b91968d

    if err != nil {
    logFatal(err)
    }

    dups/main.go

    Lines 78 to 80 in b91968d

    if _, err := io.Copy(hash, file); err != nil {
    logFatal(err)
    }


  • new functions must have test cases

    dups/main.go

    Line 89 in b91968d

    func hashFile(paths chan string, fHash chan fileHash, done chan bool) {

    dups/main.go

    Line 97 in b91968d

    func run(directory string) md5Table {

Tests

The project needs basic testing before concurrent refactor.

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.