Approval-based snapshot testing library for Go (mirror)
1
fork

Configure Feed

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

fix: drop go.work

+6 -946
+2
.gitignore
··· 8 8 .env 9 9 cmd/tui/shutter 10 10 cmd/shutter/shutter 11 + go.work 12 + go.work.sum
-13
__snapshots__/combined_ignore_and_scrub.snap
··· 1 - --- 2 - title: Combined Ignore and Scrub 3 - test_name: TestCombinedIgnoreAndScrub 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "created_at": "<TIMESTAMP>", 9 - "email": "<EMAIL>", 10 - "ip_address": "<IP>", 11 - "name": "John Doe", 12 - "user_id": "<UUID>" 13 - }
-78
__snapshots__/complex_nested_structure.snap
··· 1 - --- 2 - title: Complex Nested Structure 3 - test_name: TestComplexNestedStructure 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - shutter_test.Post{ 8 - ID: 100, 9 - Title: "Introduction to Go Snapshot Testing", 10 - Content: "This is a comprehensive guide to snapshot testing in Go...", 11 - Author: shutter_test.User{ 12 - ID: 1, 13 - Username: "john_doe", 14 - Email: "john@example.com", 15 - Active: true, 16 - CreatedAt: time.Time{ 17 - wall: 0x0, 18 - ext: 63809375400, 19 - loc: (*time.Location)(nil), 20 - }, 21 - Roles: []string{"admin", "moderator", "user"}, 22 - Metadata: map[string]interface{}{ 23 - "language": "en", 24 - "notifications": true, 25 - "preferences": map[string]interface{}{ 26 - "email_frequency": "weekly", 27 - "notifications": true, 28 - }, 29 - "theme": "dark", 30 - }, 31 - }, 32 - Tags: []string{"go", "testing", "snapshots", "best-practices"}, 33 - Comments: []shutter_test.Comment{ 34 - { 35 - ID: 1, 36 - Author: "alice", 37 - Content: "Great post!", 38 - CreatedAt: time.Time{ 39 - wall: 0x0, 40 - ext: 63810858120, 41 - loc: (*time.Location)(nil), 42 - }, 43 - Replies: []shutter_test.Comment{ 44 - { 45 - ID: 2, 46 - Author: "bob", 47 - Content: "I agree!", 48 - CreatedAt: time.Time{ 49 - wall: 0x0, 50 - ext: 63810863100, 51 - loc: (*time.Location)(nil), 52 - }, 53 - Replies: []shutter_test.Comment{ 54 - }, 55 - }, 56 - }, 57 - }, 58 - { 59 - ID: 3, 60 - Author: "charlie", 61 - Content: "Thanks for sharing!", 62 - CreatedAt: time.Time{ 63 - wall: 0x0, 64 - ext: 63810927000, 65 - loc: (*time.Location)(nil), 66 - }, 67 - Replies: []shutter_test.Comment{ 68 - }, 69 - }, 70 - }, 71 - Likes: 42, 72 - Published: true, 73 - CreatedAt: time.Time{ 74 - wall: 0x0, 75 - ext: 63809802000, 76 - loc: (*time.Location)(nil), 77 - }, 78 - }
-10
__snapshots__/custom_ignore_function.snap
··· 1 - --- 2 - title: Custom Ignore Function 3 - test_name: TestCustomIgnore 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "grade": "A", 9 - "name": "John Doe" 10 - }
-11
__snapshots__/custom_regex_scrubber.snap
··· 1 - --- 2 - title: Custom Regex Scrubber 3 - test_name: TestCustomScrubbers/regex_scrubber 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "api_key": "<API_KEY>", 9 - "name": "Test User", 10 - "secret_key": "<API_KEY>" 11 - }
-7
__snapshots__/custom_scrubber.snap
··· 1 - --- 2 - title: Custom Scrubber 3 - test_name: TestCustomScrubbers/custom_function_scrubber 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - hello world! this is a test.
-10
__snapshots__/custom_type_test.snap
··· 1 - --- 2 - title: Custom Type Test 3 - test_name: TestSnapCustomType 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - shutter_test.CustomStruct{ 8 - Name: "Alice", 9 - Age: 30, 10 - }
-7
__snapshots__/exact_match_scrubber.snap
··· 1 - --- 2 - title: Exact Match Scrubber 3 - test_name: TestCustomScrubbers/exact_match_scrubber 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - The secret password is '<PASSWORD>' and should be hidden.
-10
__snapshots__/ignore_empty_values.snap
··· 1 - --- 2 - title: Ignore Empty Values 3 - test_name: TestIgnoreValues/empty_values 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "email": "john@example.com", 9 - "name": "John Doe" 10 - }
-20
__snapshots__/ignore_in_arrays.snap
··· 1 - --- 2 - title: Ignore in Arrays 3 - test_name: TestIgnoreKeys/arrays 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "users": [ 9 - { 10 - "email": "alice@example.com", 11 - "id": 1, 12 - "name": "Alice" 13 - }, 14 - { 15 - "email": "bob@example.com", 16 - "id": 2, 17 - "name": "Bob" 18 - } 19 - ] 20 - }
-10
__snapshots__/ignore_key_pattern.snap
··· 1 - --- 2 - title: Ignore Key Pattern 3 - test_name: TestIgnoreKeyPatterns/contains_pattern 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "email": "john@example.com", 9 - "username": "john_doe" 10 - }
-10
__snapshots__/ignore_keys_matching_pattern.snap
··· 1 - --- 2 - title: Ignore Keys Matching Pattern 3 - test_name: TestIgnoreKeyPatterns/prefix_pattern 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "product_id": 100, 9 - "product_name": "Widget" 10 - }
-11
__snapshots__/ignore_multiple_keys.snap
··· 1 - --- 2 - title: Ignore Multiple Keys 3 - test_name: TestIgnoreKeys/multiple_keys 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "email": "john@example.com", 9 - "id": 1, 10 - "name": "John Doe" 11 - }
-11
__snapshots__/ignore_null_values.snap
··· 1 - --- 2 - title: Ignore Null Values 3 - test_name: TestIgnoreValues/null_values 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "age": 30, 9 - "email": "john@example.com", 10 - "name": "John Doe" 11 - }
-10
__snapshots__/ignore_password_field.snap
··· 1 - --- 2 - title: Ignore Password Field 3 - test_name: TestIgnoreKeys/key_value_pairs 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "email": "john@example.com", 9 - "username": "john_doe" 10 - }
-11
__snapshots__/ignore_sensitive_keys.snap
··· 1 - --- 2 - title: Ignore Sensitive Keys 3 - test_name: TestIgnoreSensitiveKeys 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "email": "john@example.com", 9 - "name": "John Doe", 10 - "username": "john_doe" 11 - }
-9
__snapshots__/ignore_specific_values.snap
··· 1 - --- 2 - title: Ignore Specific Values 3 - test_name: TestIgnoreValues/specific_values 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "message": "Processing" 9 - }
-16
__snapshots__/json_with_special_characters.snap
··· 1 - --- 2 - title: JSON with Special Characters 3 - test_name: TestJsonWithSpecialCharacters 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - map[string]interface{}{ 8 - "backslash": "path\\to\\file", 9 - "emoji": "😀 😃 😄 😁 😆", 10 - "english": "Hello, World!", 11 - "escaped": "quotes: \"double\" and 'single'", 12 - "newlines": "line1\nline2\rline3\r\nline4", 13 - "special_chars": "!@#$%^&*()_+-=[]{}|;:,.<>?", 14 - "tabs": "col1\tcol2\tcol3", 15 - "unicode": "こんにちは 世界 🌍", 16 - }
-54
__snapshots__/large_json_structure.snap
··· 1 - --- 2 - title: Large JSON Structure 3 - test_name: TestLargeJson 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - map[string]interface{}{ 8 - "created_at": "2023-01-28T14:30:00Z", 9 - "customer_id": 42.0, 10 - "delivered_at": nil, 11 - "id": 1001.0, 12 - "products": []interface{}{ 13 - map[string]interface{}{ 14 - "description": "High-performance laptop", 15 - "id": 1.0, 16 - "in_stock": true, 17 - "name": "Laptop", 18 - "price": 999.99, 19 - "stock": 5.0, 20 - "tags": []interface{}{ 21 - "electronics", 22 - "computers", 23 - "laptops", 24 - }, 25 - }, 26 - map[string]interface{}{ 27 - "description": "Wireless mouse", 28 - "id": 2.0, 29 - "in_stock": true, 30 - "name": "Mouse", 31 - "price": 29.99, 32 - "stock": 50.0, 33 - "tags": []interface{}{ 34 - "electronics", 35 - "accessories", 36 - }, 37 - }, 38 - map[string]interface{}{ 39 - "description": "Mechanical keyboard", 40 - "id": 3.0, 41 - "in_stock": false, 42 - "name": "Keyboard", 43 - "price": 149.99, 44 - "stock": 0.0, 45 - "tags": []interface{}{ 46 - "electronics", 47 - "accessories", 48 - }, 49 - }, 50 - }, 51 - "shipped_at": "2023-02-01T10:00:00Z", 52 - "status": "shipped", 53 - "total": 1179.97, 54 - }
-56
__snapshots__/multiple_complex_structures.snap
··· 1 - --- 2 - title: Multiple Complex Structures 3 - test_name: TestMultipleComplexStructures 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - []shutter_test.User{ 8 - { 9 - ID: 1, 10 - Username: "alice", 11 - Email: "alice@example.com", 12 - Active: true, 13 - CreatedAt: time.Time{ 14 - wall: 0x0, 15 - ext: 0, 16 - loc: (*time.Location)(nil), 17 - }, 18 - Roles: []string{"user", "moderator"}, 19 - Metadata: map[string]interface{}{ 20 - "badge": "verified", 21 - "verified": true, 22 - }, 23 - }, 24 - { 25 - ID: 2, 26 - Username: "bob", 27 - Email: "bob@example.com", 28 - Active: false, 29 - CreatedAt: time.Time{ 30 - wall: 0x0, 31 - ext: 0, 32 - loc: (*time.Location)(nil), 33 - }, 34 - Roles: []string{"user"}, 35 - Metadata: map[string]interface{}{ 36 - "avatar": "https://example.com/bob.jpg", 37 - "verified": false, 38 - }, 39 - }, 40 - { 41 - ID: 3, 42 - Username: "charlie", 43 - Email: "charlie@example.com", 44 - Active: true, 45 - CreatedAt: time.Time{ 46 - wall: 0x0, 47 - ext: 0, 48 - loc: (*time.Location)(nil), 49 - }, 50 - Roles: []string{"user", "admin"}, 51 - Metadata: map[string]interface{}{ 52 - "account_age_days": 365, 53 - "verified": true, 54 - }, 55 - }, 56 - }
-27
__snapshots__/multiple_scrubbers.snap
··· 1 - --- 2 - title: Multiple Scrubbers 3 - test_name: TestBuiltInScrubbers 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "api_key": "<API_KEY>", 9 - "backup_card": "<CREDIT_CARD>", 10 - "backup_email": "<EMAIL>", 11 - "birth_date": "<DATE>", 12 - "card_number": "<CREDIT_CARD>", 13 - "client_ip": "<IP>", 14 - "created_at": "<TIMESTAMP>", 15 - "email": "<EMAIL>", 16 - "jwt_token": "<JWT>", 17 - "message": "Connection from <IP>", 18 - "name": "John Doe", 19 - "server_ip": "<IP>", 20 - "session_id": "<UUID>", 21 - "stripe_key": "<API_KEY>", 22 - "unix_created": <UNIX_TS>, 23 - "unix_updated": <UNIX_TS>, 24 - "updated_at": "<TIMESTAMP>", 25 - "us_format_date": "<DATE>", 26 - "user_id": "<UUID>" 27 - }
-16
__snapshots__/multiple_values_test.snap
··· 1 - --- 2 - title: Multiple Values Test 3 - test_name: TestSnapMultiple 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - "value1" 8 - "value2" 9 - 42 10 - "foo" 11 - "bar" 12 - "baz" 13 - "wibble" 14 - "wobble" 15 - "tock" 16 - interface{}(nil)
-18
__snapshots__/nested_ignore_patterns.snap
··· 1 - --- 2 - title: Nested Ignore Patterns 3 - test_name: TestNestedIgnorePatterns 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "admin": {}, 9 - "user": { 10 - "email": "john@example.com", 11 - "id": 1, 12 - "name": "John Doe", 13 - "profile": { 14 - "bio": "Developer", 15 - "website": "https://example.com" 16 - } 17 - } 18 - }
-47
__snapshots__/nested_maps_and_slices.snap
··· 1 - --- 2 - title: Nested Maps and Slices 3 - test_name: TestNestedMapsAndSlices 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - map[string]interface{}{ 8 - "posts": map[string]interface{}{ 9 - "categories": []string{"tech", "lifestyle", "news"}, 10 - "drafts": 5, 11 - "published": 42, 12 - }, 13 - "stats": map[string]interface{}{ 14 - "daily": map[string]interface{}{ 15 - "clicks": 320, 16 - "conversions": map[string]interface{}{ 17 - "by_source": map[string]int{ 18 - "organic": 25, 19 - "paid": 15, 20 - "referral": 5, 21 - }, 22 - "total": 45, 23 - }, 24 - "views": 1500, 25 - }, 26 - }, 27 - "users": map[string]interface{}{ 28 - "active": []map[string]interface{}{ 29 - { 30 - "id": 1, 31 - "name": "Alice", 32 - "verified": true, 33 - }, 34 - { 35 - "id": 2, 36 - "name": "Bob", 37 - "verified": false, 38 - }, 39 - }, 40 - "inactive": []map[string]interface{}{ 41 - { 42 - "id": 3, 43 - "name": "Charlie", 44 - }, 45 - }, 46 - }, 47 - }
-28
__snapshots__/real_world_api_response.snap
··· 1 - --- 2 - title: Real World API Response 3 - test_name: TestComplexRealWorldExample 4 - file_name: ignore_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "metadata": { 9 - "server_ip": "<IP>", 10 - "session_token": "<JWT>", 11 - "user_agent": "Mozilla/5.0" 12 - }, 13 - "request_id": "<UUID>", 14 - "timestamp": "<TIMESTAMP>", 15 - "transaction": { 16 - "amount": 99.99, 17 - "currency": "USD", 18 - "id": "txn_abc123", 19 - "timestamp": "<TIMESTAMP>" 20 - }, 21 - "user": { 22 - "created_at": "<TIMESTAMP>", 23 - "email": "<EMAIL>", 24 - "id": "<UUID>", 25 - "ip_address": "<IP>", 26 - "name": "John Doe" 27 - } 28 - }
-12
__snapshots__/scrub_with_snap.snap
··· 1 - --- 2 - title: Scrub With Snap 3 - test_name: TestScrubWithSnapFunction 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - map[string]interface{}{ 8 - "created_at": "<TIMESTAMP>", 9 - "email": "<EMAIL>", 10 - "name": "John Doe", 11 - "user_id": "<UUID>", 12 - }
-12
__snapshots__/scrubbed_api_keys.snap
··· 1 - --- 2 - title: Scrubbed API Keys 3 - test_name: TestIndividualScrubbers/api_keys 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "api_key_prod": "<API_KEY>", 9 - "name": "Test Config", 10 - "stripe_key": "<API_KEY>", 11 - "test_key": "<API_KEY>" 12 - }
-12
__snapshots__/scrubbed_credit_cards.snap
··· 1 - --- 2 - title: Scrubbed Credit Cards 3 - test_name: TestIndividualScrubbers/credit_cards 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "another_card": "<CREDIT_CARD>", 9 - "backup_card": "<CREDIT_CARD>", 10 - "card_number": "<CREDIT_CARD>", 11 - "name": "John Doe" 12 - }
-12
__snapshots__/scrubbed_dates.snap
··· 1 - --- 2 - title: Scrubbed Dates 3 - test_name: TestIndividualScrubbers/dates 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "birth_date": "<DATE>", 9 - "hire_date": "<DATE>", 10 - "name": "John Doe", 11 - "us_format": "<DATE>" 12 - }
-11
__snapshots__/scrubbed_emails.snap
··· 1 - --- 2 - title: Scrubbed Emails 3 - test_name: TestIndividualScrubbers/emails 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "backup_email": "<EMAIL>", 9 - "email": "<EMAIL>", 10 - "name": "John Doe" 11 - }
-11
__snapshots__/scrubbed_ips.snap
··· 1 - --- 2 - title: Scrubbed IPs 3 - test_name: TestIndividualScrubbers/ip_addresses 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "client_ip": "<IP>", 9 - "message": "Connection from <IP>", 10 - "server_ip": "<IP>" 11 - }
-10
__snapshots__/scrubbed_jwts.snap
··· 1 - --- 2 - title: Scrubbed JWTs 3 - test_name: TestIndividualScrubbers/jwts 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "refresh_token": "<JWT>", 9 - "token": "<JWT>" 10 - }
-12
__snapshots__/scrubbed_timestamps.snap
··· 1 - --- 2 - title: Scrubbed Timestamps 3 - test_name: TestIndividualScrubbers/timestamps 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "created_at": "<TIMESTAMP>", 9 - "deleted_at": "<TIMESTAMP>", 10 - "name": "Test Event", 11 - "updated_at": "<TIMESTAMP>" 12 - }
-12
__snapshots__/scrubbed_unix_timestamps.snap
··· 1 - --- 2 - title: Scrubbed Unix Timestamps 3 - test_name: TestIndividualScrubbers/unix_timestamps 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "created": <UNIX_TS>, 9 - "deleted": <UNIX_TS>, 10 - "name": "Test Event", 11 - "updated": <UNIX_TS> 12 - }
-11
__snapshots__/scrubbed_uuids.snap
··· 1 - --- 2 - title: Scrubbed UUIDs 3 - test_name: TestIndividualScrubbers/uuid 4 - file_name: scrubbers_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "name": "John Doe", 9 - "session_id": "<UUID>", 10 - "user_id": "<UUID>" 11 - }
-42
__snapshots__/snapjson_complex_api_response.snap
··· 1 - --- 2 - title: SnapJSON Complex API Response 3 - test_name: TestSnapJsonComplexAPI 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "code": 200, 9 - "data": { 10 - "pagination": { 11 - "page": 1, 12 - "per_page": 10, 13 - "total": 3, 14 - "total_pages": 1 15 - }, 16 - "users": [ 17 - { 18 - "active": true, 19 - "department": "Engineering", 20 - "id": 1, 21 - "name": "Alice", 22 - "role": "admin" 23 - }, 24 - { 25 - "active": true, 26 - "department": "Sales", 27 - "id": 2, 28 - "name": "Bob", 29 - "role": "user" 30 - }, 31 - { 32 - "active": false, 33 - "department": "Marketing", 34 - "id": 3, 35 - "name": "Charlie", 36 - "role": "user" 37 - } 38 - ] 39 - }, 40 - "status": "success", 41 - "timestamp": "2023-11-18T21:45:30Z" 42 - }
-41
__snapshots__/snapjson_mixed_types.snap
··· 1 - --- 2 - title: SnapJSON Mixed Types 3 - test_name: TestSnapJsonMixedTypes 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "complex": [ 9 - { 10 - "id": 1, 11 - "type": "user" 12 - }, 13 - { 14 - "id": 100, 15 - "type": "post" 16 - }, 17 - [ 18 - 1, 19 - 2, 20 - 3 21 - ], 22 - "string", 23 - null 24 - ], 25 - "mixed_array": [ 26 - "string", 27 - 123, 28 - 45.67, 29 - true, 30 - false, 31 - null, 32 - { 33 - "nested": "object" 34 - }, 35 - [ 36 - 1, 37 - 2, 38 - 3 39 - ] 40 - ] 41 - }
-26
__snapshots__/snapjson_nested_objects.snap
··· 1 - --- 2 - title: SnapJSON Nested Objects 3 - test_name: TestSnapJsonWithNestedObjects 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "created_at": "2023-06-15T10:30:00Z", 9 - "user": { 10 - "id": 42, 11 - "permissions": [ 12 - "read", 13 - "write", 14 - "admin" 15 - ], 16 - "profile": { 17 - "avatar": "https://example.com/avatar.jpg", 18 - "settings": { 19 - "language": "en", 20 - "notifications": true, 21 - "theme": "dark" 22 - }, 23 - "username": "jane_smith" 24 - } 25 - } 26 - }
-84
__snapshots__/snapjson_real_world_example.snap
··· 1 - --- 2 - title: SnapJSON Real World Example 3 - test_name: TestSnapJsonRealWorldExample 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - { 8 - "data": { 9 - "product": { 10 - "description": "High-quality wireless headphones with noise cancellation", 11 - "id": "prod_12345", 12 - "inventory": { 13 - "available": 425, 14 - "damaged": 25, 15 - "reserved": 50, 16 - "total": 500 17 - }, 18 - "name": "Premium Wireless Headphones", 19 - "price": { 20 - "amount": 199.99, 21 - "currency": "USD", 22 - "discount": 10, 23 - "final_price": 179.99 24 - }, 25 - "ratings": { 26 - "average": 4.5, 27 - "breakdown": { 28 - "1": 20, 29 - "2": 30, 30 - "3": 100, 31 - "4": 350, 32 - "5": 750 33 - }, 34 - "count": 1250 35 - }, 36 - "reviews": [ 37 - { 38 - "content": "Great sound quality and comfortable to wear.", 39 - "created_at": "2023-11-15T10:30:00Z", 40 - "helpful": 25, 41 - "id": "rev_001", 42 - "rating": 5, 43 - "title": "Excellent product!", 44 - "user": "john_doe" 45 - }, 46 - { 47 - "content": "Works well, could be cheaper.", 48 - "created_at": "2023-11-10T14:20:00Z", 49 - "helpful": 12, 50 - "id": "rev_002", 51 - "rating": 4, 52 - "title": "Good but pricey", 53 - "user": "jane_smith" 54 - } 55 - ], 56 - "sku": "PWH-001", 57 - "specifications": { 58 - "battery_life": "30 hours", 59 - "colors": [ 60 - "black", 61 - "white", 62 - "blue" 63 - ], 64 - "warranty_months": 24, 65 - "weight": "250g" 66 - } 67 - }, 68 - "related_products": [ 69 - { 70 - "id": "prod_12346", 71 - "name": "Headphone Case", 72 - "price": 29.99 73 - }, 74 - { 75 - "id": "prod_12347", 76 - "name": "Audio Cable", 77 - "price": 14.99 78 - } 79 - ] 80 - }, 81 - "request_id": "req_abc123def456", 82 - "success": true, 83 - "timestamp": "2023-11-18T22:00:00Z" 84 - }
-34
__snapshots__/structure_with_empty_values.snap
··· 1 - --- 2 - title: Structure with Empty Values 3 - test_name: TestStructureWithEmptyValues 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - []shutter_test.Container{ 8 - { 9 - Items: []string{ 10 - }, 11 - Tags: map[string]string{ 12 - }, 13 - OptionalID: (*int)(nil), 14 - Count: 0, 15 - Active: false, 16 - }, 17 - { 18 - Items: []string(nil), 19 - Tags: map[string]string(nil), 20 - OptionalID: (*int)(nil), 21 - Count: 0, 22 - Active: true, 23 - }, 24 - { 25 - Items: []string{"a", "b", "c"}, 26 - Tags: map[string]string{ 27 - "env": "dev", 28 - "type": "test", 29 - }, 30 - OptionalID: &int(42), 31 - Count: 3, 32 - Active: true, 33 - }, 34 - }
-76
__snapshots__/structure_with_interface_fields.snap
··· 1 - --- 2 - title: Structure with Interface Fields 3 - test_name: TestStructureWithInterface 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - []shutter_test.Response{ 8 - { 9 - Status: "success", 10 - Message: "User retrieved", 11 - Data: shutter_test.User{ 12 - ID: 1, 13 - Username: "john", 14 - Email: "john@example.com", 15 - Active: true, 16 - CreatedAt: time.Time{ 17 - wall: 0x0, 18 - ext: 0, 19 - loc: (*time.Location)(nil), 20 - }, 21 - Roles: []string(nil), 22 - Metadata: map[string]interface{}(nil), 23 - }, 24 - Meta: map[string]interface{}{ 25 - "request_id": "req-123", 26 - "timestamp": "2023-01-20T10:30:00Z", 27 - }, 28 - }, 29 - { 30 - Status: "error", 31 - Message: "User not found", 32 - Data: nil, 33 - Meta: map[string]interface{}{ 34 - "error_code": 404, 35 - "error_type": "NOT_FOUND", 36 - }, 37 - }, 38 - { 39 - Status: "success", 40 - Message: "Posts retrieved", 41 - Data: []shutter_test.Post{ 42 - { 43 - ID: 1, 44 - Title: "First Post", 45 - Content: "", 46 - Author: shutter_test.User{ 47 - ID: 0, 48 - Username: "", 49 - Email: "", 50 - Active: false, 51 - CreatedAt: time.Time{ 52 - wall: 0x0, 53 - ext: 0, 54 - loc: (*time.Location)(nil), 55 - }, 56 - Roles: []string(nil), 57 - Metadata: map[string]interface{}(nil), 58 - }, 59 - Tags: []string(nil), 60 - Comments: []shutter_test.Comment(nil), 61 - Likes: 0, 62 - Published: true, 63 - CreatedAt: time.Time{ 64 - wall: 0x0, 65 - ext: 0, 66 - loc: (*time.Location)(nil), 67 - }, 68 - }, 69 - }, 70 - Meta: map[string]interface{}{ 71 - "page": 1, 72 - "per_page": 20, 73 - "total_count": 10, 74 - }, 75 - }, 76 - }
-27
__snapshots__/structure_with_pointers.snap
··· 1 - --- 2 - title: Structure with Pointers 3 - test_name: TestStructureWithPointers 4 - file_name: shutter_test.go 5 - version: 0.1.0 6 - --- 7 - shutter_test.Person{ 8 - Name: "John", 9 - Age: 35, 10 - Address: &shutter_test.Address{ 11 - Street: "123 Main St", 12 - City: "Boston", 13 - Zip: "02101", 14 - }, 15 - Manager: &shutter_test.Person{ 16 - Name: "Jane", 17 - Age: 30, 18 - Address: (*shutter_test.Address)(<already shown>), 19 - Manager: (*shutter_test.Person)(nil), 20 - Friends: []*shutter_test.Person(nil), 21 - Email: &string("jane@example.com"), 22 - }, 23 - Friends: []*shutter_test.Person{ 24 - (*shutter_test.Person)(<already shown>), 25 - }, 26 - Email: (*string)(nil), 27 - }
+4 -1
scripts/version.sh
··· 80 80 81 81 if [[ $REPLY =~ ^[Yy]$ ]]; then 82 82 jj tag set "$NEW_VERSION" "cmd/shutter/$NEW_VERSION" 83 - jj git push --tags 83 + # jj git push doesn't support tags, so export to git and push via git 84 + jj git export 85 + GIT_DIR=$(jj git root) 86 + git --git-dir="$GIT_DIR" push origin "$NEW_VERSION" "cmd/shutter/$NEW_VERSION" 84 87 echo "Done. Tagged and pushed $NEW_VERSION" 85 88 else 86 89 echo "Aborted."