export default function getURL ( os , arch , extended , version ) { const extendedStr = ( extended ) : string => { if ( extended === 'true' ) { return 'extended_' ; } else { return '' ; } } ; const ext = ( os ) : string => { if ( os === 'Windows' ) { return 'zip' ; } else { return 'tar.gz' ; } } ; const hugoName = `hugo_${ extendedStr ( extended ) }${ version }_${ os }-${ arch }` ; const baseURL = 'https://github.com/gohugoio/hugo/releases/download' ; const url = `${ baseURL }/v${ version }/${ hugoName }.${ ext ( os ) }` ; return url ; }