Skip to content

Commit ca0bfd9

Browse files
mark deprecated on pkg.go.dev (#531)
The godoc of deprecated types, values and functions should be match the regexp `(^|\n\s*\n)\s*Deprecated:`. https://github.com/golang/pkgsite/blob/8996ff632abee854aef1b764ca0501f262f8f523/internal/godoc/dochtml/deprecated.go#L12-L13 pkg.go.dev marks these items deprecated and show them using a special style. Co-authored-by: Lahiru Maramba <[email protected]>
1 parent 5779279 commit ca0bfd9

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

auth/user_mgt.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ func IsEmailNotFound(err error) bool {
521521

522522
// IsInsufficientPermission checks if the given error was due to insufficient permissions.
523523
//
524-
// Deprecated. Always returns false.
524+
// Deprecated: Always returns false.
525525
func IsInsufficientPermission(err error) bool {
526526
return false
527527
}
@@ -533,7 +533,7 @@ func IsInvalidDynamicLinkDomain(err error) bool {
533533

534534
// IsInvalidEmail checks if the given error was due to an invalid email.
535535
//
536-
// Deprecated. Always returns false.
536+
// Deprecated: Always returns false.
537537
func IsInvalidEmail(err error) bool {
538538
return false
539539
}
@@ -545,7 +545,7 @@ func IsPhoneNumberAlreadyExists(err error) bool {
545545

546546
// IsProjectNotFound checks if the given error was due to a non-existing project.
547547
//
548-
// Deprecated. Always returns false.
548+
// Deprecated: Always returns false.
549549
func IsProjectNotFound(err error) bool {
550550
return false
551551
}
@@ -567,7 +567,7 @@ func IsUnauthorizedContinueURI(err error) bool {
567567

568568
// IsUnknown checks if the given error was due to a unknown server error.
569569
//
570-
// Deprecated. Always returns false.
570+
// Deprecated: Always returns false.
571571
func IsUnknown(err error) bool {
572572
return false
573573
}
@@ -724,7 +724,7 @@ func (c *baseClient) GetUserByPhoneNumber(ctx context.Context, phone string) (*U
724724

725725
// GetUserByProviderID is an alias for GetUserByProviderUID.
726726
//
727-
// Deprecated. Use GetUserByProviderUID instead.
727+
// Deprecated: Use GetUserByProviderUID instead.
728728
func (c *baseClient) GetUserByProviderID(ctx context.Context, providerID string, providerUID string) (*UserRecord, error) {
729729
return c.GetUserByProviderUID(ctx, providerID, providerUID)
730730
}

iid/iid.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var errorMessages = map[int]string{
4141

4242
// IsInvalidArgument checks if the given error was due to an invalid instance ID argument.
4343
//
44-
// Deprecated. Use errorutils.IsInvalidArgument() function instead.
44+
// Deprecated: Use errorutils.IsInvalidArgument() function instead.
4545
func IsInvalidArgument(err error) bool {
4646
return errorutils.IsInvalidArgument(err)
4747
}
@@ -50,7 +50,7 @@ func IsInvalidArgument(err error) bool {
5050
// required authorization. This could be due to the client not having the required permission
5151
// or the specified instance ID not matching the target Firebase project.
5252
//
53-
// Deprecated. Use errorutils.IsUnauthenticated() or errorutils.IsPermissionDenied() instead.
53+
// Deprecated: Use errorutils.IsUnauthenticated() or errorutils.IsPermissionDenied() instead.
5454
func IsInsufficientPermission(err error) bool {
5555
return errorutils.IsUnauthenticated(err) || errorutils.IsPermissionDenied(err)
5656
}
@@ -63,37 +63,37 @@ func IsNotFound(err error) bool {
6363
// IsAlreadyDeleted checks if the given error was due to the instance ID being already deleted from
6464
// the project.
6565
//
66-
// Deprecated. Use errorutils.IsConflict() function instead.
66+
// Deprecated: Use errorutils.IsConflict() function instead.
6767
func IsAlreadyDeleted(err error) bool {
6868
return errorutils.IsConflict(err)
6969
}
7070

7171
// IsTooManyRequests checks if the given error was due to the client sending too many requests
7272
// causing a server quota to exceed.
7373
//
74-
// Deprecated. Use errorutils.IsResourceExhausted() function instead.
74+
// Deprecated: Use errorutils.IsResourceExhausted() function instead.
7575
func IsTooManyRequests(err error) bool {
7676
return errorutils.IsResourceExhausted(err)
7777
}
7878

7979
// IsInternal checks if the given error was due to an internal server error.
8080
//
81-
// Deprecated. Use errorutils.IsInternal() function instead.
81+
// Deprecated: Use errorutils.IsInternal() function instead.
8282
func IsInternal(err error) bool {
8383
return errorutils.IsInternal(err)
8484
}
8585

8686
// IsServerUnavailable checks if the given error was due to the backend server being temporarily
8787
// unavailable.
8888
//
89-
// Deprecated. Use errorutils.IsUnavailable() function instead.
89+
// Deprecated: Use errorutils.IsUnavailable() function instead.
9090
func IsServerUnavailable(err error) bool {
9191
return errorutils.IsUnavailable(err)
9292
}
9393

9494
// IsUnknown checks if the given error was due to unknown error returned by the backend server.
9595
//
96-
// Deprecated. Use errorutils.IsUnknown() function instead.
96+
// Deprecated: Use errorutils.IsUnknown() function instead.
9797
func IsUnknown(err error) bool {
9898
return errorutils.IsUnknown(err)
9999
}

messaging/messaging.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ func IsInternal(err error) bool {
955955
// IsInvalidAPNSCredentials checks if the given error was due to invalid APNS certificate or auth
956956
// key.
957957
//
958-
// Deprecated. Use IsThirdPartyAuthError().
958+
// Deprecated: Use IsThirdPartyAuthError().
959959
func IsInvalidAPNSCredentials(err error) bool {
960960
return IsThirdPartyAuthError(err)
961961
}
@@ -973,7 +973,7 @@ func IsInvalidArgument(err error) bool {
973973

974974
// IsMessageRateExceeded checks if the given error was due to the client exceeding a quota.
975975
//
976-
// Deprecated. Use IsQuotaExceeded().
976+
// Deprecated: Use IsQuotaExceeded().
977977
func IsMessageRateExceeded(err error) bool {
978978
return IsQuotaExceeded(err)
979979
}
@@ -986,7 +986,7 @@ func IsQuotaExceeded(err error) bool {
986986
// IsMismatchedCredential checks if the given error was due to an invalid credential or permission
987987
// error.
988988
//
989-
// Deprecated. Use IsSenderIDMismatch().
989+
// Deprecated: Use IsSenderIDMismatch().
990990
func IsMismatchedCredential(err error) bool {
991991
return IsSenderIDMismatch(err)
992992
}
@@ -1000,7 +1000,7 @@ func IsSenderIDMismatch(err error) bool {
10001000
// IsRegistrationTokenNotRegistered checks if the given error was due to a registration token that
10011001
// became invalid.
10021002
//
1003-
// Deprecated. Use IsUnregistered().
1003+
// Deprecated: Use IsUnregistered().
10041004
func IsRegistrationTokenNotRegistered(err error) bool {
10051005
return IsUnregistered(err)
10061006
}
@@ -1014,7 +1014,7 @@ func IsUnregistered(err error) bool {
10141014
// IsServerUnavailable checks if the given error was due to the backend server being temporarily
10151015
// unavailable.
10161016
//
1017-
// Deprecated. Use IsUnavailable().
1017+
// Deprecated: Use IsUnavailable().
10181018
func IsServerUnavailable(err error) bool {
10191019
return IsUnavailable(err)
10201020
}
@@ -1028,14 +1028,14 @@ func IsUnavailable(err error) bool {
10281028
// IsTooManyTopics checks if the given error was due to the client exceeding the allowed number
10291029
// of topics.
10301030
//
1031-
// Deprecated. Always returns false.
1031+
// Deprecated: Always returns false.
10321032
func IsTooManyTopics(err error) bool {
10331033
return false
10341034
}
10351035

10361036
// IsUnknown checks if the given error was due to unknown error returned by the backend server.
10371037
//
1038-
// Deprecated. Always returns false.
1038+
// Deprecated: Always returns false.
10391039
func IsUnknown(err error) bool {
10401040
return false
10411041
}

0 commit comments

Comments
 (0)