Skip to content

Commit f613939

Browse files
committed
fix doc
1 parent 1ecdc76 commit f613939

File tree

2 files changed

+11
-25
lines changed

2 files changed

+11
-25
lines changed

internal/workflow.go

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,8 +1603,8 @@ type GetVersionOptions struct {
16031603
// }
16041604
//
16051605
// The code above supports replaying of workflow execution with both versions DefaultVersion and 1.
1606-
// All new workflow executions will execute foo activity, because
1607-
// GetVersion with the ExecuteWithVersion option returns DefaultVersion, that will be recorded into the workflow history
1606+
// All new workflow executions will execute foo activity, because GetVersion with ExecuteWithMinVersion option
1607+
// returns DefaultVersion, that will be recorded into the workflow history.
16081608
//
16091609
// 2. Enable execution of bar activity
16101610
//
@@ -1617,7 +1617,7 @@ type GetVersionOptions struct {
16171617
//
16181618
// The code above supports replaying of workflow execution with both versions DefaultVersion and 1.
16191619
// All new workflow executions will execute bar activity, because
1620-
// GetVersion returns the maximum supported version - 1, that will be recorded into the workflow history
1620+
// GetVersion returns the maximum supported version - 1, that will be recorded into the workflow history.
16211621
//
16221622
// 3. Remove a support of foo activity:
16231623
//
@@ -1626,23 +1626,16 @@ type GetVersionOptions struct {
16261626
//
16271627
// When there are no workflow executions running DefaultVersion the support of foo activity can be removed.
16281628
//
1629-
// The ExecuteWithVersion option is useful when you want to ensure that your changes can be safely rolled back if needed.
1629+
// ExecuteWithVersion option is useful when you want to ensure that your changes can be safely rolled back if needed.
16301630
func ExecuteWithVersion(version Version) GetVersionOptions {
16311631
return GetVersionOptions{
16321632
CustomVersion: &version,
16331633
}
16341634
}
16351635

16361636
// ExecuteWithMinVersion forces minSupported version to be returned when GetVersion is executed for the first time,
1637-
// instead of returning maxSupported version. This option can be used when you want to separate
1638-
// the versioning of the workflow code and activation of the new logic in the workflow code,
1639-
// to ensure that your changes can be safely rolled back, if needed.
1640-
// 2 options below are equivalent to each other:
1641-
//
1642-
// GetVersion(ctx, "fooChange", 1, 2, ExecuteWithVersion(1))
1643-
// GetVersion(ctx, "fooChange", 1, 2, ExecuteWithMinVersion())
1644-
//
1645-
// Check the ExecuteWithVersion documentation for more details on how to use ExecuteWithMinVersion.
1637+
// instead of returning maxSupported version. The option is equivalent to ExecuteWithVersion(minSupportedVersion).
1638+
// Check the ExecuteWithVersion documentation for more details.
16461639
func ExecuteWithMinVersion() GetVersionOptions {
16471640
return GetVersionOptions{
16481641
UseMinVersion: true,

workflow/workflow.go

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ const DefaultVersion Version = internal.DefaultVersion
378378
// }
379379
//
380380
// The code above supports replaying of workflow execution with both versions DefaultVersion and 1.
381-
// All new workflow executions will execute foo activity, because
382-
// GetVersion with ExecuteWithMinVersion option returns DefaultVersion, that will be recorded into the workflow history
381+
// All new workflow executions will execute foo activity, because GetVersion with ExecuteWithMinVersion option
382+
// returns DefaultVersion, that will be recorded into the workflow history.
383383
//
384384
// 2. Enable execution of bar activity
385385
//
@@ -392,7 +392,7 @@ const DefaultVersion Version = internal.DefaultVersion
392392
//
393393
// The code above supports replaying of workflow execution with both versions DefaultVersion and 1.
394394
// All new workflow executions will execute bar activity, because
395-
// GetVersion returns the maximum supported version - 1, that will be recorded into the workflow history
395+
// GetVersion returns the maximum supported version - 1, that will be recorded into the workflow history.
396396
//
397397
// 3. Remove a support of foo activity:
398398
//
@@ -407,15 +407,8 @@ func ExecuteWithVersion(version Version) internal.GetVersionOptions {
407407
}
408408

409409
// ExecuteWithMinVersion forces minSupported version to be returned when GetVersion is executed for the first time,
410-
// instead of returning maxSupported version. This option can be used when you want to separate
411-
// the versioning of the workflow code and activation of the new logic in the workflow code,
412-
// to ensure that your changes can be safely rolled back, if needed.
413-
// 2 options below are equivalent to each other:
414-
//
415-
// GetVersion(ctx, "fooChange", 1, 2, ExecuteWithVersion(1))
416-
// GetVersion(ctx, "fooChange", 1, 2, ExecuteWithMinVersion())
417-
//
418-
// Check the ExecuteWithVersion documentation, for more details on how to use ExecuteWithMinVersion.
410+
// instead of returning maxSupported version. The option is equivalent to ExecuteWithVersion(minSupportedVersion).
411+
// Check the ExecuteWithVersion documentation for more details.
419412
func ExecuteWithMinVersion() internal.GetVersionOptions {
420413
return internal.ExecuteWithMinVersion()
421414
}

0 commit comments

Comments
 (0)