<commit_before># gows

Go Workspace / Environment Manager, to easily manage the Go Workspace during development.


## The idea

Work in **isolated (development) environment** when you're working on your Go projects.
**No cross-project dependency version missmatch**, no more packages left out from `vendor/`.

No need for initializing a go workspace either, **your project can be located anywhere**,
not just in a predefined `$GOPATH` workspace.
`gows` will take care about crearing the (per-project isolated) workspace directory
structure, no matter where your project is located.

`gows` **works perfectly with other Go tools**, all it does is it ensures
that every project gets it's own, isolated Go workspace and sets `$GOPATH`
accordingly.


## Install

### Install & Prepare Go

Install & configure `Go` - [official guide](https://golang.org/doc/install).

Make sure you have `$GOPATH/bin` in your `$PATH`, e.g. by adding

```
export PATH="$PATH:$GOPATH/bin"
```

to your `~/.bash_profile` or `~/.bashrc` (don't forget to `source` it or to open a new Terminal window/tab
if you just added this line to the profile file).

*This makes sure that the Go projects you build/install will be available in any Terminal / Command Line
window, without the need to type in the full path of the binary.*


### Install `gows`

```
go get -u github.com/bitrise-tools/gows
```

That's all. If you have a "properly" configured Go environment (see the previous Install section)
then you should be able to run `gows -version` now, to be able to run `gows` in any directory.

<commit_msg>readme : GOPATH, shell init notes<commit_after># gows

Go Workspace / Environment Manager, to easily manage the Go Workspace during development.


## The idea

Work in **isolated (development) environment** when you're working on your Go projects.
**No cross-project dependency version missmatch**, no more packages left out from `vendor/`.

No need for initializing a go workspace either, **your project can be located anywhere**,
not just in a predefined `$GOPATH` workspace.
`gows` will take care about crearing the (per-project isolated) workspace directory
structure, no matter where your project is located.

`gows` **works perfectly with other Go tools**, all it does is it ensures
that every project gets it's own, isolated Go workspace and sets `$GOPATH`
accordingly.


## Install

### Install & Prepare Go

Install & configure `Go` - [official guide](https://golang.org/doc/install).

Make sure you have `$GOPATH/bin` in your `$PATH`, e.g. by adding

```
export PATH="$PATH:$GOPATH/bin"
```

to your `~/.bash_profile` or `~/.bashrc` (don't forget to `source` it or to open a new Terminal window/tab
if you just added this line to the profile file).

*This makes sure that the Go projects you build/install will be available in any Terminal / Command Line
window, without the need to type in the full path of the binary.*


**Allow GOPATH to be overwritten by `gows` for "shell jump in" (see the "Jump into a prepared Shell" section)**:
To allow `gows` to overwrite the GOPATH for shells initialized **by/through** `gows` you should
change your `GOPATH` entry in your `~/.bash_profile` / `~/.bashrc` (or wherever you did set GOPATH for your
shell). For Bash (`~/.bash_profile` / `~/.bashrc`) you can use this form:

Instead of:

```
export GOPATH="/my/go/path"
```

Use something like this:

```
if [ -z "$GOPATH" ] ; then
  export GOPATH="/my/go/path"
fi
```

This means that your (Bash) shell will only set the `GOPATH` environment if it's not set to a value already, if it's
empty.

This is not required if you use `gows` only in a "single command" style, it's only required if you want to initialize
the shell and jump into the initialized shell through `gows`. In general it's safe to initialize the
environment variable this way even if you don't plan to initialize any shell through `gows`,
as this will always initialize `GOPATH` *unless* it's already initialized (e.g. by an outer shell).


### Install `gows`

```
go get -u github.com/bitrise-tools/gows
```

That's all. If you have a "properly" configured Go environment (see the previous Install section)
then you should be able to run `gows -version` now, to be able to run `gows` in any directory.


{'fraction_non_alphanumeric': 0.10004708097928437, 'fraction_numerical': 0.0, 'mean_word_length': 4.278260869565218, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '586304', 'n_tokens_mistral': 1277, 'n_tokens_neox': 1196, 'n_words': 620}