This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // file: Extensions\StringExtensions.cs | |
| // | |
| // summary: Implements the string extensions class | |
| //////////////////////////////////////////////////////////////////////////////////////////////////// | |
| using System; | |
| using System.Linq; | |
| using System.Security.Cryptography; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Copyright (c) 2018 A Bit of Help, Inc. - All Rights Reserved, Worldwide. | |
| // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. | |
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Package refcnt implements a reference count based []byte buffer. | |
| package refcnt | |
| import ( | |
| "errors" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Copyright (c) 2018 A Bit of Help, Inc. - All Rights Reserved, Worldwide. | |
| // Use of this source code is governed by a MIT license that can be found in the LICENSE file. | |
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Package main implements streaming of a file through a buffered channel where it is written to a new file. | |
| // A data race condition arose in the for loop that reads data from the input file and sending it to the channel. | |
| // I moved the allocation of the buffer to the top of the loop, to resolve the data race issue. | |
| // I've created a companion gist,"go-stream-file-between-goroutines-with-pipe" that resolves the race issue using a | |
| // FIFO pipe. It worked, but the price was that it was slower than using a channel. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Copyright (c) 2018 A Bit of Help, Inc. - All Rights Reserved, Worldwide. | |
| // Use of this source code is governed by a MIT license that can be found in the LICENSE file. | |
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Package main implements an ETL process where a file is read, and its contents streamed to a fan-out consisting | |
| // of two, parallel goroutines: One that calculates the MD5 checksum and passes it along to the fan-in stage; The | |
| // other saves the content stream to a new file and passes the file's metadata to the fan-in stage. The fan-in stage | |
| // is the sink for the ETL process. It merges the metadata from the fan-out operations into a JSON object, which is | |
| // persisted to a local file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Copyright (c) 2018 A Bit of Help, Inc. - All Rights Reserved, Worldwide. | |
| // Use of this source code is governed by a MIT license that can be found in the LICENSE file. | |
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Package main is the entry point for the application | |
| // and is responsible for configuring the environment. | |
| package main | |
| import ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Copyright (c) 2018 A Bit of Help, Inc. - All Rights Reserved, Worldwide. | |
| // Use of this source code is governed by a MIT license that can be found in the LICENSE file. | |
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Package main is the entry point for the application | |
| // and is responsible for configuring the environment. | |
| package main | |
| import ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Copyright (c) 2018 A Bit of Help, Inc. - All Rights Reserved, Worldwide. | |
| // Use of this source code is governed by a MIT license that can be found in the LICENSE file. | |
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Package main is the entry point for the application | |
| // and is responsible for configuring the environment. | |
| package main | |
| import ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Copyright (c) 2018 A Bit of Help, Inc. - All Rights Reserved, Worldwide. | |
| // Use of this source code is governed by a MIT license that can be found in the LICENSE file. | |
| //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| // Package main is the entry point for the application | |
| // and is responsible for configuring the environment. | |
| package main | |
| import ( |
NewerOlder