Simple, intuitive snapshot testing for Go 📸
0

Configure Feed

Select the types of activity you want to include in your feed.

Update project from template

Tom Fleet (Nov 13, 2025, 7:57 PM UTC) ca5ee055 8fd7126c

+86 -75
+7
.gitattributes
··· 1 1 # Auto detect text files and perform LF normalization 2 2 * text=auto 3 + 4 + # Force LF even on windows for testdata, means comparisons don't fail just 5 + # because of line endings 6 + **/testdata/* text eol=lf 7 + 8 + # Txtar requires lf 9 + *.txtar text eol=lf
+16 -15
.gitignore
··· 1 - # Created by https://www.toptal.com/developers/gitignore/api/macos,windows,linux,visualstudiocode,jetbrains+all,go 2 - # Edit at https://www.toptal.com/developers/gitignore?templates=macos,windows,linux,visualstudiocode,jetbrains+all,go 1 + # Created by https://www.toptal.com/developers/gitignore/api/macos,windows,linux,visualstudiocode,goland+all,go 2 + # Edit at https://www.toptal.com/developers/gitignore?templates=macos,windows,linux,visualstudiocode,goland+all,go 3 3 4 4 ### Go ### 5 5 # If you prefer the allow list template instead of the deny list, see community template: ··· 17 17 18 18 # Output of the go coverage tool, specifically when used with LiteIDE 19 19 *.out 20 - coverage.html 21 - 22 - # Taskfile 23 - .task 24 - 25 - # Comparative benchmarks 26 - before.txt 27 - after.txt 28 20 29 21 # Dependency directories (remove the comment below to include it) 30 22 # vendor/ 31 23 32 - # Go workspace file 24 + # Go workspace files 33 25 go.work 26 + go.work.sum 34 27 35 - ### JetBrains+all ### 28 + ### GoLand+all ### 36 29 # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 37 30 # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 38 31 ··· 111 104 # Android studio 3.1+ serialized cache file 112 105 .idea/caches/build_file_checksums.ser 113 106 114 - ### JetBrains+all Patch ### 107 + ### GoLand+all Patch ### 115 108 # Ignore everything but code style settings and run configurations 116 109 # that are supposed to be shared within teams. 117 110 ··· 170 163 171 164 ### VisualStudioCode ### 172 165 .vscode/* 173 - !.vscode/settings.json 166 + # !.vscode/settings.json 174 167 !.vscode/tasks.json 175 168 !.vscode/launch.json 176 169 !.vscode/extensions.json ··· 213 206 # Windows shortcuts 214 207 *.lnk 215 208 216 - # End of https://www.toptal.com/developers/gitignore/api/macos,windows,linux,visualstudiocode,jetbrains+all,go 209 + # End of https://www.toptal.com/developers/gitignore/api/macos,windows,linux,visualstudiocode,goland+all,go 210 + 211 + # Zed editor 212 + .zed/* 213 + # !.zed/settings.json 214 + !.zed/tasks.json 215 + 216 + # Taskfile 217 + .task/
+4 -11
.golangci.yml
··· 11 11 extra-rules: true 12 12 13 13 golines: 14 - max-len: 140 14 + max-len: 120 15 15 16 16 linters: 17 17 default: all ··· 25 25 - funlen # Bad metric for complexity 26 26 - ginkgolinter # I don't use whatever this is 27 27 - gochecknoglobals # Globals are fine sometimes, use common sense 28 - - gocognit # Cmplexity with another name, don't need both 29 28 - gocyclo # cyclop does this instead 30 29 - godox # "todo" and "fixme" comments are allowed 31 30 - goheader # No need ··· 42 41 - unparam # gopls is better and more subtle 43 42 - varnamelen # Lots of false positives of things that are fine 44 43 - wrapcheck # Not every error must be wrapped 45 - - wsl # Very aggressive, some of this I like but tend to do anyway 46 - - wsl_v5 # As above, just newer version 44 + - wsl # Deprecated 47 45 48 46 exclusions: 49 47 presets: 50 48 # See https://golangci-lint.run/usage/false-positives/#exclusion-presets 51 - - comments # Revive in particular has lots of false positives 52 49 - std-error-handling 53 50 - common-false-positives 54 51 rules: ··· 56 53 linters: 57 54 - prealloc # These kinds of optimisations will make no difference to test code 58 55 - gosec # Tests don't need security stuff 59 - 56 + - goconst # Sometimes repetition is okay in tests 60 57 paths: 61 58 - internal/diff 62 59 ··· 158 155 disabled: true # predeclared does this 159 156 160 157 - name: unhandled-error 161 - arguments: 162 - - fmt\.(Fp|P)rint(ln|f)? 163 - - strings.Builder.Write(String|Byte)? 164 - - bytes.Buffer.Write(String|Byte)? 165 - - go/printer.(Fp|P)rint(ln|f)? 158 + disabled: true # errcheck handles this 166 159 167 160 - name: flag-parameter 168 161 disabled: true # As far as I can work out this just doesn't like bools
-1
.mailmap
··· 1 - Tom Fleet <me@followtheprocess.codes> <tomfleet2018@gmail.com>
+4
.typos.toml
··· 1 1 [default.extend-words] 2 + byt = "byt" # Useful name as byte is a keyword in go 2 3 decorder = "decorder" # Name of a Go linter 4 + 5 + [files] 6 + extend-exclude = ["go.mod", "go.sum"]
+2 -2
LICENSE
··· 1 - 2 1 MIT License 3 2 4 - Copyright (c) 2024, Tom Fleet 3 + Copyright (c) 2025, Tom Fleet 5 4 6 5 Permission is hereby granted, free of charge, to any person obtaining a copy 7 6 of this software and associated documentation files (the "Software"), to deal ··· 20 19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 21 SOFTWARE. 22 +
+1 -1
README.md
··· 1 1 # Snapshot 2 2 3 3 <p align="center"> 4 - <img src="https://github.com/FollowTheProcess/snapshot/raw/main/img/logo.jpg" alt="logo" width=75%> 4 + <img src="https://github.com/FollowTheProcess/snapshot/raw/main/docs/img/logo.jpg" alt="logo" width=75%> 5 5 </p> 6 6 7 7 [![License](https://img.shields.io/github/license/FollowTheProcess/snapshot)](https://github.com/FollowTheProcess/snapshot)
+11 -8
Taskfile.yml
··· 25 25 desc: Run go fmt on all source files 26 26 sources: 27 27 - "**/*.go" 28 - - .golangci.yml 29 28 cmds: 30 - - golangci-lint fmt 29 + - go fmt ./... 31 30 32 31 test: 33 32 desc: Run the test suite 34 33 sources: 35 34 - "**/*.go" 35 + - go.mod 36 + - go.sum 37 + - "**/testdata/**/*" 38 + env: 39 + # -race needs CGO (https://go.dev/doc/articles/race_detector#Requirements) 40 + CGO_ENABLED: 1 36 41 cmds: 37 - - go test -race -cover ./... {{ .CLI_ARGS }} 42 + - go test -race ./... {{ .CLI_ARGS }} 38 43 39 44 bench: 40 45 desc: Run all project benchmarks ··· 44 49 - go test ./... -run None -benchmem -bench . {{ .CLI_ARGS }} 45 50 46 51 lint: 47 - desc: Run the linters and auto-fix if possible 52 + desc: Run linting 48 53 sources: 49 54 - "**/*.go" 50 55 - .golangci.yml 51 - deps: 52 - - fmt 53 56 preconditions: 54 57 - sh: command -v golangci-lint 55 58 msg: golangci-lint not installed, see https://golangci-lint.run/usage/install/#local-installation ··· 62 65 63 66 doc: 64 67 desc: Render the pkg docs locally 65 - cmds: 66 - - pkgsite -open 67 68 preconditions: 68 69 - sh: command -v pkgsite 69 70 msg: pkgsite not installed, run `go install golang.org/x/pkgsite/cmd/pkgsite@latest` 71 + cmds: 72 + - pkgsite -open 70 73 71 74 cov: 72 75 desc: Calculate test coverage and render the html
-2
codecov.yml
··· 1 - ignore: 2 - - internal/colour
+1 -1
go.mod
··· 9 9 10 10 require ( 11 11 golang.org/x/sys v0.38.0 // indirect 12 - golang.org/x/term v0.37.0 // indirect 12 + golang.org/x/term v0.35.0 // indirect 13 13 )
+2 -2
go.sum
··· 2 2 go.followtheprocess.codes/hue v1.0.0/go.mod h1:gSn5xK6KJapih+eFgQk3woo1qg3/rx9XSrAanUIuDr8= 3 3 golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= 4 4 golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= 5 - golang.org/x/term v0.37.0 h1:8EGAD0qCmHYZg6J17DvsMy9/wJ7/D/4pV/wfnld5lTU= 6 - golang.org/x/term v0.37.0/go.mod h1:5pB4lxRNYYVZuTLmy8oR2BH8dflOR+IbTYFD8fi3254= 5 + golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ= 6 + golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA= 7 7 golang.org/x/tools v0.39.0 h1:ik4ho21kwuQln40uelmciQPp9SipgNDdrafrYA4TmQQ= 8 8 golang.org/x/tools v0.39.0/go.mod h1:JnefbkDPyD8UU2kI5fuf8ZX4/yUeh9W877ZeBONxUqQ=
+1
option.go
··· 84 84 } 85 85 86 86 s.filters = append(s.filters, filter{pattern: re, replacement: replacement}) 87 + 87 88 return nil 88 89 } 89 90 }
+10 -5
.github/renovate.json
··· 1 1 { 2 2 "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 - "extends": ["config:recommended"], 4 - "labels": ["dependencies"], 5 - "postUpdateOptions": ["gomodTidy"], 6 - "packageRules": [{ "matchManagers": ["golang-version"] }] 7 - } 3 + "extends": [ 4 + "config:recommended" 5 + ], 6 + "labels": [ 7 + "dependencies" 8 + ], 9 + "postUpdateOptions": [ 10 + "gomodTidy" 11 + ] 12 + }
img/logo.jpg

This is a binary file and will not be displayed.

+27
.github/workflows/release-drafter.yml
··· 1 + name: Release Drafter 2 + 3 + on: 4 + push: 5 + branches: 6 + - main 7 + pull_request: 8 + types: 9 + - opened 10 + - reopened 11 + - synchronize 12 + 13 + permissions: {} 14 + 15 + jobs: 16 + draft_release: 17 + name: Draft Release 18 + runs-on: ubuntu-latest 19 + permissions: 20 + contents: write 21 + pull-requests: read 22 + 23 + steps: 24 + - name: Run Release Drafter 25 + uses: release-drafter/release-drafter@v6 26 + env: 27 + GITHUB_TOKEN: ${{ github.token }}
-27
.github/workflows/release_drafter.yml
··· 1 - name: Release Drafter 2 - 3 - on: 4 - push: 5 - branches: 6 - - main 7 - pull_request: 8 - types: 9 - - opened 10 - - reopened 11 - - synchronize 12 - 13 - permissions: {} 14 - 15 - jobs: 16 - draft_release: 17 - name: Draft Release 18 - runs-on: ubuntu-latest 19 - permissions: 20 - contents: write 21 - pull-requests: read 22 - 23 - steps: 24 - - name: Run Release Drafter 25 - uses: release-drafter/release-drafter@v6 26 - env: 27 - GITHUB_TOKEN: ${{ github.token }}
docs/img/logo.jpg

This is a binary file and will not be displayed.