Skip to content

Commit 94200bf

Browse files
qmuntalgopherbot
authored andcommitted
all: fix Microsoft links
This CL fixes the links to Microsoft documentation in the Go source code. Some links were broken and some others were outdated. Change-Id: I4c3bcd3aa3c07a31be1b7f94c25339dcc2e771e8 Reviewed-on: https://go-review.googlesource.com/c/go/+/527556 Reviewed-by: Heschi Kreinick <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Run-TryBot: Quim Muntal <[email protected]> Auto-Submit: Quim Muntal <[email protected]>
1 parent e50bbae commit 94200bf

File tree

13 files changed

+20
-20
lines changed

13 files changed

+20
-20
lines changed

src/archive/zip/struct.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ func timeZone(offset time.Duration) *time.Location {
245245

246246
// msDosTimeToTime converts an MS-DOS date and time into a time.Time.
247247
// The resolution is 2s.
248-
// See: https://msdn.microsoft.com/en-us/library/ms724247(v=VS.85).aspx
248+
// See: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-dosdatetimetofiletime
249249
func msDosTimeToTime(dosDate, dosTime uint16) time.Time {
250250
return time.Date(
251251
// date bits 0-4: day of month; 5-8: month; 9-15: years since 1980
@@ -265,7 +265,7 @@ func msDosTimeToTime(dosDate, dosTime uint16) time.Time {
265265

266266
// timeToMsDosTime converts a time.Time to an MS-DOS date and time.
267267
// The resolution is 2s.
268-
// See: https://msdn.microsoft.com/en-us/library/ms724274(v=VS.85).aspx
268+
// See: https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-filetimetodosdatetime
269269
func timeToMsDosTime(t time.Time) (fDate uint16, fTime uint16) {
270270
fDate = uint16(t.Day() + int(t.Month())<<5 + (t.Year()-1980)<<9)
271271
fTime = uint16(t.Second()/2 + t.Minute()<<5 + t.Hour()<<11)

src/cmd/dist/sys_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var (
1414
procGetSystemInfo = modkernel32.NewProc("GetSystemInfo")
1515
)
1616

17-
// see https://msdn.microsoft.com/en-us/library/windows/desktop/ms724958(v=vs.85).aspx
17+
// see https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-system_info
1818
type systeminfo struct {
1919
wProcessorArchitecture uint16
2020
wReserved uint16
@@ -29,7 +29,7 @@ type systeminfo struct {
2929
wProcessorRevision uint16
3030
}
3131

32-
// See https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-system_info
32+
// See https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-system_info
3333
const (
3434
PROCESSOR_ARCHITECTURE_AMD64 = 9
3535
PROCESSOR_ARCHITECTURE_INTEL = 0

src/cmd/go/internal/fsys/fsys.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ func volumeNameLen(path string) int {
690690
if path[1] == ':' && ('a' <= c && c <= 'z' || 'A' <= c && c <= 'Z') {
691691
return 2
692692
}
693-
// is it UNC? https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx
693+
// is it UNC? https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file
694694
if l := len(path); l >= 5 && isSlash(path[0]) && isSlash(path[1]) &&
695695
!isSlash(path[2]) && path[2] != '.' {
696696
// first, leading `\\` and next shouldn't be `\`. its server name.

src/internal/syscall/windows/registry/key.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131

3232
const (
3333
// Registry key security and access rights.
34-
// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms724878.aspx
34+
// See https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-key-security-and-access-rights
3535
// for details.
3636
ALL_ACCESS = 0xf003f
3737
CREATE_LINK = 0x00020
@@ -98,7 +98,7 @@ func (k Key) ReadSubKeyNames() ([]string, error) {
9898

9999
names := make([]string, 0)
100100
// Registry key size limit is 255 bytes and described there:
101-
// https://msdn.microsoft.com/library/windows/desktop/ms724872.aspx
101+
// https://learn.microsoft.com/en-us/windows/win32/sysinfo/registry-element-size-limits
102102
buf := make([]uint16, 256) //plus extra room for terminating zero byte
103103
loopItems:
104104
for i := uint32(0); ; i++ {

src/internal/syscall/windows/reparse_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ const (
1717
)
1818

1919
// These structures are described
20-
// in https://msdn.microsoft.com/en-us/library/cc232007.aspx
21-
// and https://msdn.microsoft.com/en-us/library/cc232006.aspx.
20+
// in https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/ca069dad-ed16-42aa-b057-b6b207f447cc
21+
// and https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/b41f1cbf-10df-4a47-98d4-1c52a833d913.
2222

2323
type REPARSE_DATA_BUFFER struct {
2424
ReparseTag uint32

src/os/os_windows_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func TestDirectoryJunction(t *testing.T) {
281281
},
282282
},
283283
{
284-
// Do as junction utility https://technet.microsoft.com/en-au/sysinternals/bb896768.aspx does - set PrintNameLength to 0.
284+
// Do as junction utility https://learn.microsoft.com/en-us/sysinternals/downloads/junction does - set PrintNameLength to 0.
285285
name: "have_blank_print_name",
286286
mklink: func(link, target string) error {
287287
var t reparseData
@@ -885,7 +885,7 @@ func main() {
885885
` \\\\\""x"""y z`,
886886
"\tb\t\"x\ty\"",
887887
` "Брад" d e`,
888-
// examples from https://msdn.microsoft.com/en-us/library/17w5ykft.aspx
888+
// examples from https://learn.microsoft.com/en-us/cpp/cpp/main-function-command-line-args
889889
` "abc" d e`,
890890
` a\\b d"e f"g h`,
891891
` a\\\"b c d`,

src/os/path_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ var canUseLongPaths bool
139139
// or contains .. elements), or is short enough, fixLongPath returns
140140
// path unmodified.
141141
//
142-
// See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath
142+
// See https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation
143143
func fixLongPath(path string) string {
144144
if canUseLongPaths {
145145
return path

src/os/user/lookup_windows.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func lookupGroupName(groupname string) (string, error) {
116116
if e != nil {
117117
return "", e
118118
}
119-
// https://msdn.microsoft.com/en-us/library/cc245478.aspx#gt_0387e636-5654-4910-9519-1f8326cf5ec0
119+
// https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/7b2aeb27-92fc-41f6-8437-deb65d950921#gt_0387e636-5654-4910-9519-1f8326cf5ec0
120120
// SidTypeAlias should also be treated as a group type next to SidTypeGroup
121121
// and SidTypeWellKnownGroup:
122122
// "alias object -> resource group: A group object..."
@@ -145,7 +145,7 @@ func listGroupsForUsernameAndDomain(username, domain string) ([]string, error) {
145145
}
146146
var p0 *byte
147147
var entriesRead, totalEntries uint32
148-
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa370655(v=vs.85).aspx
148+
// https://learn.microsoft.com/en-us/windows/win32/api/lmaccess/nf-lmaccess-netusergetlocalgroups
149149
// NetUserGetLocalGroups() would return a list of LocalGroupUserInfo0
150150
// elements which hold the names of local groups where the user participates.
151151
// The list does not follow any sorting order.
@@ -255,7 +255,7 @@ func lookupUserPrimaryGroup(username, domain string) (string, error) {
255255
//
256256
// The correct way to obtain the primary group of a domain user is
257257
// probing the user primaryGroupID attribute in the server Active Directory:
258-
// https://msdn.microsoft.com/en-us/library/ms679375(v=vs.85).aspx
258+
// https://learn.microsoft.com/en-us/windows/win32/adschema/a-primarygroupid
259259
//
260260
// Note that the primary group of domain users should not be modified
261261
// on Windows for performance reasons, even if it's possible to do that.

src/runtime/race_amd64.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// Arguments are passed in CX, DX, R8, R9, the rest is on stack.
2525
// Callee-saved registers are: BX, BP, DI, SI, R12-R15.
2626
// SP must be 16-byte aligned. Windows also requires "stack-backing" for the 4 register arguments:
27-
// https://msdn.microsoft.com/en-us/library/ms235286.aspx
27+
// https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention
2828
// We do not do this, because it seems to be intended for vararg/unprototyped functions.
2929
// Gcc-compiled race runtime does not try to use that space.
3030

src/runtime/sys_windows_amd64.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ loadregs:
5858
// Floating point arguments are passed in the XMM
5959
// registers. Set them here in case any of the arguments
6060
// are floating point values. For details see
61-
// https://msdn.microsoft.com/en-us/library/zthk2dkh.aspx
61+
// https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170
6262
MOVQ CX, X0
6363
MOVQ DX, X1
6464
MOVQ R8, X2

src/syscall/security_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const (
3030
)
3131

3232
// This function returns 1 byte BOOLEAN rather than the 4 byte BOOL.
33-
// https://blogs.msdn.com/b/drnick/archive/2007/12/19/windows-and-upn-format-credentials.aspx
33+
// https://learn.microsoft.com/en-gb/archive/blogs/drnick/windows-and-upn-format-credentials
3434
//sys TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) [failretval&0xff==0] = secur32.TranslateNameW
3535
//sys GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) [failretval&0xff==0] = secur32.GetUserNameExW
3636

src/syscall/syscall_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ var procSetFilePointerEx = modkernel32.NewProc("SetFilePointerEx")
475475
const ptrSize = unsafe.Sizeof(uintptr(0))
476476

477477
// setFilePointerEx calls SetFilePointerEx.
478-
// See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365542(v=vs.85).aspx
478+
// See https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-setfilepointerex
479479
func setFilePointerEx(handle Handle, distToMove int64, newFilePointer *int64, whence uint32) error {
480480
var e1 Errno
481481
if unsafe.Sizeof(uintptr(0)) == 8 {

src/syscall/types_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ const (
586586
SIO_KEEPALIVE_VALS = IOC_IN | IOC_VENDOR | 4
587587
SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12
588588

589-
// cf. https://support.microsoft.com/default.aspx?scid=kb;en-us;257460
589+
// cf. https://learn.microsoft.com/en-US/troubleshoot/windows/win32/header-library-requirement-socket-ipproto-ip
590590

591591
IP_TOS = 0x3
592592
IP_TTL = 0x4

0 commit comments

Comments
 (0)