Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code January 2024 (1.86.1) update breaks coloring in Go #165

Open
brituck opened this issue Feb 9, 2024 · 2 comments
Open

VS Code January 2024 (1.86.1) update breaks coloring in Go #165

brituck opened this issue Feb 9, 2024 · 2 comments

Comments

@brituck
Copy link

brituck commented Feb 9, 2024

Please provide as much information as possible, usually I need these information to actually start working on an issue, so try to fill as much of these as possible

Sample code

package transport

import "net/http"

const (
	success         = "success"
	failure         = "failure"
	badRequest      = "bad_request"
	accessDenied    = "access_denied"
	unexpectedError = "unexpected_error"
)

var ipcStatusMapping = map[int]string{
	401: accessDenied,
	400: badRequest,
}

func StatusToIPCStatus(status int) string {
	if status == http.StatusServiceUnavailable {
		return StatusToIPCStatusDetail(http.StatusTooManyRequests)
	}
	return StatusToIPCStatusDetail(status)
}

func StatusToIPCStatusDetail(statusCode int) string {
	if ipcst, ok := ipcStatusMapping[statusCode]; ok {
		return ipcst
	}

	switch statusCode / 100 {
	case 2, 3:
		return success
	case 4:
		return badRequest
	default:
		return unexpectedError
	}
}


Filename and Language selected

.go and Golang

VSCode 1.85.2

Screenshot 2024-02-08 at 10 29 35 PM

VSCode 1.86.1

Screenshot 2024-02-08 at 10 30 46 PM

Versions used

  • Theme version: 2.3.0

Extra information

settings.json

"gopls": {
        
        "ui.semanticTokens": true 
    },
@jandono
Copy link

jandono commented Mar 7, 2024

Came here wanting to create the exact same issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants