opentofu/internal/command/views
Martin Atkins a800d250e5
Some checks are pending
build / Build for freebsd_386 (push) Waiting to run
build / Build for linux_386 (push) Waiting to run
build / Build for openbsd_386 (push) Waiting to run
build / Build for windows_386 (push) Waiting to run
build / Build for freebsd_amd64 (push) Waiting to run
build / Build for linux_amd64 (push) Waiting to run
build / Build for openbsd_amd64 (push) Waiting to run
build / Build for solaris_amd64 (push) Waiting to run
build / Build for windows_amd64 (push) Waiting to run
build / Build for freebsd_arm (push) Waiting to run
build / Build for linux_arm (push) Waiting to run
build / Build for linux_arm64 (push) Waiting to run
build / Build for darwin_amd64 (push) Waiting to run
build / Build for darwin_arm64 (push) Waiting to run
build / End-to-end Tests for linux_386 (push) Waiting to run
build / End-to-end Tests for windows_386 (push) Waiting to run
build / End-to-end Tests for darwin_amd64 (push) Waiting to run
build / End-to-end Tests for linux_amd64 (push) Waiting to run
build / End-to-end Tests for windows_amd64 (push) Waiting to run
Quick Checks / List files changed for pull request (push) Waiting to run
Quick Checks / Unit tests for linux_386 (push) Blocked by required conditions
Quick Checks / Unit tests for linux_amd64 (push) Blocked by required conditions
Quick Checks / Unit tests for windows_amd64 (push) Blocked by required conditions
Quick Checks / Unit tests for linux_arm (push) Blocked by required conditions
Quick Checks / Unit tests for darwin_arm64 (push) Blocked by required conditions
Quick Checks / Unit tests for linux_arm64 (push) Blocked by required conditions
Quick Checks / Race Tests (push) Blocked by required conditions
Quick Checks / End-to-end Tests (push) Blocked by required conditions
Quick Checks / Code Consistency Checks (push) Blocked by required conditions
Quick Checks / License Checks (push) Waiting to run
Website checks / List files changed for pull request (push) Waiting to run
Website checks / Build (push) Blocked by required conditions
Website checks / Test Installation Instructions (push) Blocked by required conditions
command: "go fix" on various files we've changed recently anyway
We don't typically just broadly run automatic rewriting tools like "go fix"
across our codebase because that tends to cause annoying and unnecessary
merge conflicts when we're backporting to earlier release branches.

But all of the files in this commit were changed in some non-trivial way
already during the OpenTofu v1.11 development period anyway, and so the
likelyhood we'd be able to successfully backport from them is reduced and
therefore this seems like a good opportunity to do some focused
modernization using "go fix".

My rules for what to include or not are admittedly quite "vibes-based", but
the general idea was:

 - Focusing on files under the "command" directory only, because that's
   already been an area of intentional refactoring during this development
   period.
 - If the existing diff in a file is already significantly larger than
   the changes the fixer proposed to make, or if the fixer is proposing
   to change a line that was already changed in this development period.
 - More willing to include "_test.go" files than non-test files, even if
   they hadn't changed as much already, just because backports from test
   files for bug fixes tend to be entirely new test cases more than they
   are modifications to existing test cases, and so the risk of conflicts
   is lower there.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2026-03-17 15:25:30 -07:00
..
json Ephemeral outputs (#3123) 2025-09-10 07:45:23 -04:00
jsonfunction Refactor version command to use View instead of Ui and to use the arguments package (#3806) 2026-03-05 14:47:29 +02:00
testdata Revert "Fixes #898: Replace hashicorp and terraform references" (#995) 2023-12-11 15:10:03 -05:00
apply.go Support dual output streams in most commands (#3606) 2026-01-20 14:08:10 -05:00
apply_test.go command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
console.go Refactor console command to use View instead of Ui (#3764) 2026-03-02 18:58:11 +02:00
console_test.go Refactor console command to use View instead of Ui (#3764) 2026-03-02 18:58:11 +02:00
fmt.go Refactor fmt command to use View instead of Ui and to use the arguments package (#3805) 2026-03-05 14:47:37 +02:00
fmt_test.go Refactor fmt command to use View instead of Ui and to use the arguments package (#3805) 2026-03-05 14:47:37 +02:00
get.go Refactor get command to use View instead of Ui (#3752) 2026-02-24 10:07:28 +02:00
get_test.go Refactor get command to use View instead of Ui (#3752) 2026-02-24 10:07:28 +02:00
graph.go Refactor graph command to use View instead of Ui and to use the arguments package (#3802) 2026-03-04 15:21:37 +02:00
graph_test.go Refactor graph command to use View instead of Ui and to use the arguments package (#3802) 2026-03-04 15:21:37 +02:00
hook_count.go Ephemeral todos handling (#3177) 2025-09-10 07:45:23 -04:00
hook_count_test.go Feature branch: Ephemeral resources (#2852) 2025-08-04 16:39:12 +03:00
hook_json.go Feature branch: Ephemeral resources (#2852) 2025-08-04 16:39:12 +03:00
hook_json_test.go command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
hook_module_install.go Refactor init command to use View instead of Ui (#3749) 2026-02-11 16:29:31 +02:00
hook_module_install_test.go command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
hook_ui.go Feature branch: Ephemeral resources (#2852) 2025-08-04 16:39:12 +03:00
hook_ui_test.go Feature branch: Ephemeral resources (#2852) 2025-08-04 16:39:12 +03:00
import.go Refactor import command to use View instead of Ui and to use the arguments package (#3772) 2026-03-06 15:11:57 +02:00
import_test.go Refactor import command to use View instead of Ui and to use the arguments package (#3772) 2026-03-06 15:11:57 +02:00
init.go Refactor init command to use View instead of Ui (#3749) 2026-02-11 16:29:31 +02:00
init_test.go command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
json_view.go command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
json_view_test.go command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
login.go Refactor login command to use View instead of Ui (#3757) 2026-02-17 00:29:59 +02:00
login_test.go command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
logout.go Refactor logout command to use View instead of Ui (#3761) 2026-02-24 10:05:54 +02:00
logout_test.go Refactor logout command to use View instead of Ui (#3761) 2026-02-24 10:05:54 +02:00
metadata_functions.go Refactor version command to use View instead of Ui and to use the arguments package (#3806) 2026-03-05 14:47:29 +02:00
metadata_functions_test.go Refactor version command to use View instead of Ui and to use the arguments package (#3806) 2026-03-05 14:47:29 +02:00
operation.go Refactor import command to use View instead of Ui and to use the arguments package (#3772) 2026-03-06 15:11:57 +02:00
operation_test.go command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
output.go Support dual output streams in most commands (#3606) 2026-01-20 14:08:10 -05:00
output_test.go Support dual output streams in most commands (#3606) 2026-01-20 14:08:10 -05:00
plan.go Support dual output streams in most commands (#3606) 2026-01-20 14:08:10 -05:00
plan_test.go Support dual output streams in most commands (#3606) 2026-01-20 14:08:10 -05:00
providers.go Refactor providers command to use View instead of Ui and to use the arguments package (#3811) 2026-03-05 09:49:15 +02:00
providers_lock.go Refactor providers lock command to use View instead of Ui and to use the arguments package (#3812) 2026-03-05 09:49:36 +02:00
providers_lock_test.go Refactor providers lock command to use View instead of Ui and to use the arguments package (#3812) 2026-03-05 09:49:36 +02:00
providers_mirror.go Refactor providers mirror command to use View instead of Ui and to use the arguments package (#3813) 2026-03-04 15:20:39 +02:00
providers_mirror_test.go Refactor providers mirror command to use View instead of Ui and to use the arguments package (#3813) 2026-03-04 15:20:39 +02:00
providers_test.go Refactor providers command to use View instead of Ui and to use the arguments package (#3811) 2026-03-05 09:49:15 +02:00
refresh.go Support dual output streams in most commands (#3606) 2026-01-20 14:08:10 -05:00
refresh_test.go command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
show.go Support dual output streams in most commands (#3606) 2026-01-20 14:08:10 -05:00
show_test.go Support dual output streams in most commands (#3606) 2026-01-20 14:08:10 -05:00
state.go Refactor state rm command to use View instead of Ui and to use the arguments package (#3849) 2026-03-10 17:54:01 +02:00
state_locker.go Support dual output streams in most commands (#3606) 2026-01-20 14:08:10 -05:00
state_test.go Refactor state rm command to use View instead of Ui and to use the arguments package (#3849) 2026-03-10 17:54:01 +02:00
taint.go Refactor taint && untaint commands to use View instead of Ui and to use the arguments package (#3818) 2026-03-05 09:50:36 +02:00
taint_test.go Refactor taint && untaint commands to use View instead of Ui and to use the arguments package (#3818) 2026-03-05 09:50:36 +02:00
test.go command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
test_test.go command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
unlock.go Refactor unlock command to use View instead of Ui and to use the arguments package (#3823) 2026-03-04 15:20:19 +02:00
unlock_test.go Refactor unlock command to use View instead of Ui and to use the arguments package (#3823) 2026-03-04 15:20:19 +02:00
validate.go Support dual output streams in most commands (#3606) 2026-01-20 14:08:10 -05:00
validate_test.go command: "go fix" on various files we've changed recently anyway 2026-03-17 15:25:30 -07:00
version.go Refactor version command to use View instead of Ui and to use the arguments package (#3806) 2026-03-05 14:47:29 +02:00
version_test.go Refactor version command to use View instead of Ui and to use the arguments package (#3806) 2026-03-05 14:47:29 +02:00
view.go Refactor console command to use View instead of Ui (#3764) 2026-03-02 18:58:11 +02:00
view_test.go Refactor console command to use View instead of Ui (#3764) 2026-03-02 18:58:11 +02:00
view_ui.go Refactor init command to use View instead of Ui (#3749) 2026-02-11 16:29:31 +02:00
view_ui_test.go Refactor init command to use View instead of Ui (#3749) 2026-02-11 16:29:31 +02:00
views.go Refactor console command to use View instead of Ui (#3764) 2026-03-02 18:58:11 +02:00
workspace.go Refactor all workspace commands to use View instead of Ui (#3770) 2026-03-03 12:44:56 +02:00
workspace_test.go Refactor all workspace commands to use View instead of Ui (#3770) 2026-03-03 12:44:56 +02:00