You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rusage_syscall.go
    path of file: ./repos/sliver/vendor/tailscale.com/types/logger
    
    the code of the file until where you have to start completion: // Copyright (c) Tailscale Inc & AUTHORS
// SPDX-License-Identifier: BSD-3-Clause

//go:build !windows && !wasm && !plan9 && !tamago

package logger

import (
	"runtime"

	"golang.org/x/sys/unix"
)

func rusageMaxRSS() float64 {
	var ru unix.Rusage
	err := unix.Getrusage(unix.RUSAGE_SELF, &ru)
	if err != nil {
		return 0
	}

	rs
    
func rusageMaxRSS() float64 {
	var ru unix.Rusage
	err := unix.Getrusage(unix.RUSAGE_SELF, &ru)
	if err != nil {
		return 0
	}

	rss := float64(ru.Maxrss)
	if runtime.GOOS == "darwin" || runtime.GOOS == "ios" {
		rss /= 1 << 20 // ru_maxrss is bytes on darwin
	} else {
		// ru_maxrss is kilobytes elsewhere (linux, openbsd, etc)
		rss /= 1 << 10
	}
	return rss
}